How to enable Timeout of Service Callout policy when using with flow variables in a URL

Not applicable

Can anyone please answer to the question from a customer?

--------------------------

I develop API proxy using ServiceCallout now. The setting of timeout does not work when I set flow variable in a URL of HTTPTargetConnection.

*Setting timeout works normally

<Timeout>5001</Timeout>
<HTTPTargetConnection>
<Properties/>
<URL>http://10.120.160.99:8000/cgi-bin/sleep.py</URL>
</HTTPTargetConnection>

*Setting timeout does not work

<Timeout>5001</Timeout>
<HTTPTargetConnection>
<Properties/>
<URL>http://{flow.baas.host}:8000/cgi-bin/sleep.py</URL>
</HTTPTargetConnection>

Is there any workaround if the above is a restriction of Service Callout policy?

Solved Solved
1 7 702
1 ACCEPTED SOLUTION

adas
New Member

@Toshihiro Shibamoto I think this is a bug, the timeout is not being honoured when you have a dynamic host in the service callout URL. Please open a JIRA under APIRT project.

View solution in original post

7 REPLIES 7

That seems like a bug, @Toshihiro Shibamoto ! Have you filed a Jira ticket? Update, 2016 June 16: yes, the Jira number is APIRT-2193.

adas
New Member

@Toshihiro Shibamoto I think this is a bug, the timeout is not being honoured when you have a dynamic host in the service callout URL. Please open a JIRA under APIRT project.

@arghya das Thank you for the comment. I tested this on the version OPDK 14.07 which the customer uses and it reproduced also with 15.01. But it looks just ok on the 15.07 with the response rightly given as;

{"fault":{"faultstring":"Execution of ServiceCallout ServiceCallout failed. Reason: timeout occurred ServiceCallout","detail":{"errorcode":"steps.servicecallout.ExecutionFailed"}}} 

Also the current public cloud looks ok. So, this can be a bug in the former releases as you say. I'll open a JIRA to confirm it.

@arghya das

we were able to reproduce this in 15.07.05 and 15.07.03 - so it is still broken in 15.07. I have not tested it in 16.01 yet as we are still working out the details of how to install in our infrastructure. Can someone share the JIRA number w/ me so I can open another support ticket pointing to it? We have some confused internal customers who this is impacting right now.

BG

BG - here's the Jira #: APIRT-2193.

According to our records, it's still open.

Not applicable

Is this issue resolved. I am still facing this issue

Hi All,
If you are using dynamic target endpoint please don not use the Timeout element instead use "connect.timeout.millis" property

<Properties>
     
<Property name="connect.timeout.millis">true</Property>
   
</Properties>

 and for some reason Timeout element is still not working for dynamic URL's