Mehrnoosh Mehrnoosh - 1 year ago 166
reST (reStructuredText) Question

Get read time out when Call restful API in the sequence with Iterate mediator in wso2 ESB

I'm new in the WSO2 ESB. I need your help. I get data from database by DSS and send them into a rest web service with call (in block mode) or send mediator. I split my records to individual messages in ESB by Iterate mediator and set iterate mediator properties to ture and then send date as parameters to my API. I can see in the log iterate mediator splits records to individual messages and put them in my html endpoint correctly.
But I get a "read time out response" in ESB after calling my end point. If i don't use iterate mediator and I put parameters directly in the properties as test and send them to my rest API, It works fine. But when I use Iterate mediator to get parameters from DSS and send them to API, it faces with time out error.
I checked log mediator to see what happened, the error is unable to send via post to my endpoint and read time out. I copied the URL for my endpoint from ESB log and tried to invoke it by SoapUI, It works fine without any time out issue.

My api is civicrm api: my Api parametrs are defined :


I used Call mediator for call api by blocking mode true.
I sent first_name, last_name, contact_type from DSS:


After iterate mediator I put log mediator and can see the above value.
After calling endpoint, I received this error:
http://localhost/CIVICRM/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&key=1111&user=test&pass=passsss&api_key=1111111111&version=3&contact_type=Individual&first_name=Testname&last_name=TestFamily, MessageID: urn:uuid:daa47ef5-1f7a-4f2c-9372-ba17f0e282ee, Direction: response, MESSAGE = Executing default 'fault' sequence, ERROR_CODE = 401000, ERROR_MESSAGE = Read timed out

When I put this endpoint in SoapUI, It works.
When I don't use DSS and iterate mediator and Put parametrs directly in sequence, it works.

I appreciate your help. Thanks

Answer Source

I've added Disable-chunking property set value to true before Send mediator.

 <property name="DISABLE_CHUNKING" value="true" scope="axis2"/>

The problem was solved.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download