0

We are using webservice consumer to hit a service hosted by 3rd party. While hitting the service, SocketTimeOutException happens after 16 minutes.

Our webservice consumer config is as given below.

<ws:consumer-config name="config_name"
    wsdlLocation="${wsdlLocation}"
    service="Service_name" port="service_portType"
    serviceAddress="${serviceAddress}"
    doc:name="Web Service Consumer" />

    <ws:consumer config-ref="config_name" operation="test_operation"
        doc:name="do_it" />

We have a default response timeout set at top of the configuration file.

      <configuration defaultResponseTimeout="1000000" doc:name="Configuration" />

Now, when we asked the 3rd party about the time out, they asked us to set the SO_TIMEOUT of server to 0.

I know we can set it for https:connector with property 'serverSoTimeout="0"'. My question is how do we set it for Webservice consumer?

Renjith
  • 1,122
  • 1
  • 19
  • 45

1 Answers1

0

This can be set by adding a parameter to your webservice endpoint like this: http://hostname:port/restoftheendpoint?responseTimeout=120000 Or This can be set up on the http listener global configuration attached to your wsconsumer config as below:

<ws:consumer-config name="test"         wsdlLocation="test.wsdl" service="test" port="testSoap"         serviceAddress="${test.endpoint}" doc:name="Web Service Consumer"       connectorConfig="HTTP_Request_Config" />
    <http:request-config name="HTTP_Request_Config" host="test" port="2000" responseTimeout="30000" doc:name="HTTP Request Configuration">

    </http:request-config>
jvas
  • 440
  • 1
  • 7
  • 19
  • what difference it makes with the defaultResponseTimeout? – Renjith Aug 08 '16 at 11:51
  • I think your request is timing out in 16 minutes because of your default timeout setup which is 1000000 milliseconds (approx 16mins). If you are okay to change this global setting, you could do that or you could handle it for each endpoint as above. – jvas Aug 08 '16 at 16:31