Sonic Connect Client Timeout

Posted by kasch65 on 25-Jul-2012 09:56

We are running a Sonic connect SOAP Client with the configuration below.

For Tests we have reduced the Timeout interval to 5 seconds. Simulating a slow Server responding after 10 seconds we would expect a timeout.

Instead the Timeout is always 60 seconds.

Is there another place where to adjust response timeout for SonicConnect?

Spring.xml:

...

    <bean id="BPERetryBean" class="de.hpa.bpe.esb.BPERetryBean">
        <property name="contextDescription" value="BIK Webservice"/>
        <property name="maximumRedeliveries" value="5"/>
        <property name="firstWarning" value="${BikInService.BikInPort.firstWarning}"/>
        <property name="maxLoggedMsgLen" value="${BikInService.BikInPort.maxLoggedMsgLen}"/>
    </bean>

    <bean id="BpeRedeliveryPolicy" class="org.apache.camel.processor.RedeliveryPolicy">
        <property name="redeliverDelay" value="1000"/>
        <property name="retryAttemptedLogLevel" value="INFO"/>
        <property name="retriesExhaustedLogLevel" value="INFO"/>

    </bean>
...

        <camel:onException id="RedeliveryOnSoapFault">
            <camel:exception>org.apache.cxf.binding.soap.SoapFault</camel:exception>
            <camel:onWhen>
                <camel:simple>${exception.message} contains 'Recoverable'</camel:simple>
            </camel:onWhen>
            <camel:retryUntil>
                <camel:method bean="BPERetryBean" method="retry"/>
            </camel:retryUntil>
            <camel:redeliveryPolicy ref="BpeRedeliveryPolicy"/>
        </camel:onException>
        <camel:onException id="RedeliveryOnInternalFault">
            <camel:exception>org.apache.cxf.interceptor.Fault</camel:exception>
            <camel:retryUntil>
                <camel:method bean="BPERetryBean" method="retry"/>
            </camel:retryUntil>
            <camel:redeliveryPolicy ref="BpeRedeliveryPolicy"/>
        </camel:onException>
...

    <cxf:cxfEndpoint id="BikInPortEndpoint" address="${BikInService.BikInPort.address}" endpointName="tns1:BikInPort" serviceName="tns1:BikInService" wsdlURL="${BikInService.BikInPort.wsdlURL}">
        <cxf:properties>
            <entry key="mtom-enabled" value="${BikInService.BikInPort.mtomEnabled}"/>
            <entry key="dataFormat" value="PAYLOAD"/>
            <entry key="loggingFeatureEnabled" value="${BikInService.BikInPort.loggingFeatureEnabled}"/>
            <entry key="connectionTimeout" value="5000"/>
            <entry key="receiveTimeout" value="5000"/>
            <entry key="org.apache.cxf.logging.FaultListener">
                <bean class="de.hpa.bpe.esb.BPEFaultListener"/>
            </entry>
        </cxf:properties>
    </cxf:cxfEndpoint>

...

        <camel:route id="BikInService.BikInPort.sendeAsrInit">
            <camel:from uri="directsonicesb:BikInService.BikInPort.sendeAsrInit?bindingStrategy=#InvokeBindingStrategy.BikInService.BikInPort.sendeAsrInit&amp;headerFilterStrategy=#DirectInvokeHeaderFilterStrategy.BikInService.BikInPort.sendeAsrInit"/>
            <camel:setHeader headerName="operationName">
                <camel:constant>sendeAsrInit</camel:constant>
            </camel:setHeader>
            <camel:setHeader headerName="requestContext#user">
                <camel:constant>techAdmin@example.com</camel:constant>
            </camel:setHeader>
            <camel:setHeader headerName="requestContext#password">
                <camel:constant>techAdmin</camel:constant>
            </camel:setHeader>
            <camel:setHeader headerName="requestcontext#language">
                <camel:constant>de</camel:constant>
            </camel:setHeader>
            <camel:removeHeader headerName="transfer-encoding"/>
            <camel:to uri="cxf:bean:BikInPortEndpoint?headerFilterStrategy=#InvokeHeaderFilterStrategy.BikInService.BikInPort.sendeAsrInit"/>
        </camel:route>

...

hpa.esb.ws.BIK.properties (in rootfolder of Project):

...

project.esbconfig.timeoutInterval=5000

All Replies

Posted by wtam on 25-Jul-2012 11:31

To set ReceiveTimeout, you need to set it at the CXF conduit level.  Here is the reference.

http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html

You will need to do something like this:

  "{http://apache.org/hello_world_soap_http}SoapPort.http-conduit">
    ReceiveTimeout="5000"/>
 

The trick here is to find out the conduit's name.  It is the Qname of the Port as defined in the WSDL  and appended with ".http-conduit".  You can also use wildcard as documented in the wiki above.

This thread is closed