Converting service callout to Target HTTP connection

skulkarni
Participant I

Instead of service callout , we want to make request through target endpoint and use the response from targetHttpconnection in policies under Proxy response flow.But once we convert , we are not seeing response from target url which we get incase of service callout.Please suggest is this achievable.

0 2 112
2 REPLIES 2

Hi, let's see if we can help.

What do you mean by this?

But once we convert , we are not seeing response from target url which we get incase of service callout.

Can you give more details? Maybe a Trace UI screenshot.

Also, What RouteRules do you have in the ProxyEndpoint? Can you show the XML? are you certain that the proxy is routing to the target?

The way things work in Apigee Edge:

  • you define a proxyendpoint that listens on a basepath and a vhost
  • deploy the proxy biundle containing that proxyendpoint
  • Apigee Edge routes any inbound request for that vhost and basepath into the proxyendpoint
  • Apigee Edge executes the steps specified in the preflow, conditionalflow and postflow for the Request, in that order.
  • Apigee Edge possibly selects a target, according to the RouteRules in the ProxyEndpoint; If a target is selected, Apigee Edge activates the request on that target.
  • Apigee Edge executes the steps in the preflow, conditional flow and postflow for the Request as specified in the TargetEndpoint
  • Apigee Edge sends the request to the target
  • Apigee Edge receives the response from the target
  • Apigee Edge executes the steps in the preflow, conditional flow and postflow for the Response on the TargetEndpoint
  • the response transfers back to the proxyendpoint
  • Apigee Edge executes the steps in the preflow, conditional flow and postflow for the Response on the TargetEndpoint
  • Apigee Edge sends the response to the client
  • Apigee Edge executes the steps in the PostClientFlow in the ProxyEndpoint

If you don't see the request being sent to the target, one possible problem is that you have no RouteRule telling the proxyendpoint to "use this target".

@Sandeep Kulkarni - Can you please also share the curl request from trace? we want to see where exactly you are facing issue.