Skip to Content
avatar image
Former Member

Service Callout Policy not working as expected

Hi everyone,

I am trying to do a mashup of 3 services.I have 2 service callouts in proxy preflow. The configuration for service callout policy is as below:

Service callout 1:

<ServiceCallout async="true" continueOnError="false" enabled="true" xmlns="http://www.sap.com/apimgmt">
<Request></Request>
<Response>scResponse1</Response>
<Timeout>30000</Timeout>
<HTTPTargetConnection>
<URL>http://httpbin.org/get</URL>
</HTTPTargetConnection>
</ServiceCallout>

Service Callout 2:

<ServiceCallout async="true" continueOnError="false" enabled="true" xmlns="http://www.sap.com/apimgmt">
<Request/>
<Response>scResponse2</Response>
<Timeout>30000</Timeout>
<HTTPTargetConnection>
<URL>http://httpbin.org/get?show_env=1</URL>
</HTTPTargetConnection>
</ServiceCallout>

I am expecting the response in the variables scResponse1 and scResponse2 but these variables are not getting populated. When I am trying to extract this variable in Javascript, I am not able to get anything.

Is this the correct behaviour? or I am doing something wrong here.

Note: In debug, I found that response from service callout is getting populated in the predefined variable "ServiceCallout.response" but since I have 2 service callouts, this variable is getting overwritten with the response from the latest service callout.

Thanks,

Gagandeep Singh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers