synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herwig David (JIRA)" <>
Subject [jira] Commented: (SYNAPSE-675) 'InputStream cannot be NULL' when calling a web service via synapse proxy service
Date Mon, 16 Aug 2010 09:46:21 GMT


Herwig David commented on SYNAPSE-675:

Hi Hiranya,

I have changed the web service to return less data and the response now arrives the client.

But with another web service I have still an issue with the response.
    <!-- define a reuseable endpoint definition -->
    <sequence name="_ProxyOut">
        <log level="full"/>

    <sequence name="WS7X4PilOrder_ProxyIn" trace="enable">
                <address uri="https://app02-srapme.medical-"/>

    <proxy name="WS7X4PatientInfoLeafletOrder" transports="https">
        <publishWSDL key="WS7X4PilOrder_ProxyWsdl"/>
        <target inSequence="WS7X4PilOrder_ProxyIn" outSequence="_ProxyOut">

I have changed the client coding by adding additional timeout parameter and retry handler
configution. See below.
Also I have set the parameters SO_TIMEOUT and CONNECTION in the axis2.xml in synapse conf
directory and the axis2.xml on tomcat installation for the web service.

Instead of the 'InputStream cannot be NULL' message I now get the axis fault 'The server
failed to respond'.
When calling the web service directly on the tomcat the response takes about 5 seconds. So
timeout shouldn't be the issue here.

I have attached the synapse log files but do not see an issue there. Alsp the log files on
tomcat do not contain a fault behavior.

I assume the amount of data processed by synapse is the issue here.

Thanks and regards,

	        options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(timeOutInMilliSeconds));
	        options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(timeOutInMilliSeconds));

	        HttpMethodParams methodParams = new HttpMethodParams(); 
	        DefaultHttpMethodRetryHandler retryHandler = new DefaultHttpMethodRetryHandler(0,
	        methodParams.setParameter(HttpMethodParams.RETRY_HANDLER, retryHandler); 
	        options.setProperty(HTTPConstants.HTTP_METHOD_PARAMS, methodParams); 

> 'InputStream cannot be NULL' when calling a web service via synapse proxy service
> ---------------------------------------------------------------------------------
>                 Key: SYNAPSE-675
>                 URL:
>             Project: Synapse
>          Issue Type: Bug
>          Components: Proxy Services
>    Affects Versions: 1.2
>         Environment: standalone synapse 1.2 ( installation on windows
xp SP2 and Tomcat 5.5 with axis2-1.5.1 
>            Reporter: Herwig David
>            Assignee: Hiranya Jayathilaka
>         Attachments: service.log, synapse.log, trace.log, wrapper.log
> Hi,
> When calling one of my web services via synapse proxy service I get an AxisFault 'InputStream
cannot be NULL'.
> When calling the web service directly on the tomcat I get the response without problems.
> Both are https requests.
> Searching the internet I have found two solutions to increase the timeout:
> 1st: setting the client options:
> "
>             ServiceClient client = stub._getServiceClient();
>             client.engageModule("addressing"); 
>             client.engageModule("rampart"); 
>             // get option object 
>             Options options = client.getOptions();
>             // set username / password
>             options.setProperty("user", TestClient.userAlias.toString());
> 	    options.setProperty("encryptionUser", TestClient.serverAlias);
> 	    options.setTimeOutInMilliSeconds(1200000);
>             //setting created option into service      
>             client.setOptions(options); 
> "
> 2nd: Increasing the timeout in synapse.xml
> "
>     <sequence name="_ProxyOut">
>         <send/>
>     </sequence>
>     <!-- Delivery Service -->
>     <sequence name="WS7X4Delivery_ProxyIn" trace="disable">
>         <send>
>             <endpoint>
>                 <address uri=""/>

>             </endpoint>
>         </send>
>     </sequence>
>     <proxy name="WS7X4Delivery" transports="https">
>         <publishWSDL key="WS7X4Delivery_ProxyWsdl"/> 
>         <target inSequence="WS7X4Delivery_ProxyIn" outSequence="_ProxyOut"/>
>     </proxy>
> "
> Unfortunately this doesn't help.
> I assume that the connection issue is on synapse side.
> Is there another way to increase the timeout in synapse when using as proxy service?
> Thanks and regards,
> Herwig
> ---------------------
> Herwig David
> EDV-Entwicklung
> kohlpharma GmbH
> Im Holzhau 8, 66663 Merzig, Germany
> eMail:

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message