axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert lazarski" <robertlazar...@gmail.com>
Subject Re: [Axis2] Socket connection on Client and Server not disconnecting
Date Tue, 19 Sep 2006 16:42:28 GMT
This is a known issue:

http://issues.apache.org/jira/browse/AXIS2-935

There is a patch submitted. If you could attach your test case to it
I'll take a look at the patch.

Robert

On 9/19/06, Brian Bacsu <bbacsu@csc.com> wrote:
>
> Hi,
>
> We have implemented an Axis2 client to call web services exposed through
> both .NET and Axis1 running on Microsoft Server 2003. I have encountered an
> issue with the Axis2 client with regard to disconnecting the client and
> server socket connections. The server-side connection will finally time-out
> and drop (It looks like Microsoft Server will hang onto connections for 60
> seconds, even after close requested), but the client side connections
> continue to collect until the server begins to run out of
> resources/connections. The client connections show CLOSE_WAIT status when
> viewed with netstat .
>
> Any suggestions would be appreciated.
>
> Here is a sample of the client code:
>
>          Options options = new Options();
>
>
> options.setExceptionToBeThrownOnSOAPFault(Boolean.TRUE);
>
>         options.setTo(new EndpointReference(url.toString()));
>         ServiceClient serviceClient = null;
>         MessageContext requestContext =
> CFWsoapClient.getMessageContext(OM_Msg,this,soapRoot, logger, traceLevel);
>         requestContext.setSoapAction(action);
>         try {
>
>             options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>             options.setProperty(HTTPConstants.SO_TIMEOUT,1000);
>             options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
> Boolean.FALSE);
>
> options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,
> (int)timeout);
>
>             serviceClient = new ServiceClient();
>             serviceClient.setOptions(options);
>             OperationClient opClient =
> serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
>             opClient.addMessageContext(requestContext);
>             opClient.execute(true);
>
>             MessageContext resultContext =
> opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
>
>             SOAPEnvelope resEnvelope = resultContext.getEnvelope();
>             SOAPBody body = resEnvelope.getBody();
>
>             opClient.complete(resultContext);
>              return body;
>         }
>         catch (AxisFault e1) {
>             e1.printStackTrace();
>             throw new AxisFault(e1.getMessage());
>         }
>          finally {
>             try {
>                 serviceClient.finalizeInvoke();
>             } catch (AxisFault axisFault) {
>                     logger.error(axisFault.getMessage() +
> axisFault.toString());
>             } catch (Exception e) {
>                     logger.error(e.getMessage() + e.toString());
>             }
>
>         }
>
> Thanks,
>
>  Brian Bacsu
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message