Service callout getting timed out

I am calling a webservice using Service callout .It is able to hit the service and get the resposne , but only half of the response is being processed by service callout. When I checked the trace , I could see under the Properties section , action is getting set to PAUSE . Can anybody help on how to get make the service callout policy to continue and process the entire respone , if the response has a huge payload.

1 9 1,103
9 REPLIES 9

I am wondering... how big is the payload?

It is XML payload. Might be pretty huge..not sure of the size. But when I call the same webservice service using target.url from target endpoint , the entire response can be processed.

But my requirement is make two synchronous POST (need to send request payload) service call in a single proxy call. So I planned to make use of service callout policy to call the first service and the second service to call from target endpoint. But this isn't working for me due to the issue I am facing using service callout. Is there any way to make two synchonous call (second call when he first call is a success) using Javascript etc ??

It is XML payload. Might be pretty huge..not sure of the size. But when I call the same webservice using target.url from target endpoint , the entire response can be processed.

But my requirement is make two synchronous POST (need to send request payload) service call in a single proxy call. So I planned to make use of service callout policy to call the first service and the second service to call from target endpoint. But this isn't working for me due to the issue I am facing using service callout. Is there any way to make two synchronous call (second call when he first call is a success) using Javascript etc ??

@GargiTalukdar

The Apigee trace sometimes shows only part of response if the response is too big. Can you do a context.getVariable(<service callout response variable>) in JS and see if you still see partial response?

We are having the same issue and the response is still truncated in the JS print statement.

We were printing the wrong variable, fixed now.

adas
New Member

@GargiTalukdar Have you tried setting a longer timeout value for the service callout and see if that succeeds:

<Timeout>300000</Timeout>
<HTTPTargetConnection>
<Properties/>
<URL>http://mytarget/api/resources.xml</URL>
</HTTPTargetConnection>

The timeout is in millis. For more details, please refer to: http://apigee.com/docs/api-services/reference/service-callout-policy

This did not work for us