Hi,

Axis 2.1.3 - WSDL2Java Client stub issues

I am new to Axis. I have insatalled axis2-1.3 and trying to use client stub generated by WSDL2java utility to test my Webservices.



I have used following command to generate webservice client stub from my MyService.wsdl file:



C:\axis2-1.3\bin>wsdl2java -s -wv 1.1 -ap -uri MyService.wsdl



And using following Code to send message to webservice Server:



private MyServiceStub stub;



// Instantiate Client

try {

stub = new MyService(MyService_URL);

} catch (AxisFault e) {

System.out.println("Unable to Instantiate Client Stub " + e.getMessage());

e.printStackTrace();

}



// Prepare request

Request req = new Request ();

req.setParam("Hi There");



Response resp;

try {

resp = stub.myOperation(req);

System.out.println("Send request successful");

} catch (FaultResponse fault) {

System.out.println("Error Response :" + fault.getMessage());

fault.printStackTrace();

return;

} catch (RemoteException re) {

System.out.println("RemoteException Occured :" + re.getMessage());

re.printStackTrace();

return;

} catch (Exception e) {

System.out.println("Exception Occured :" + e.getMessage());

e.printStackTrace();

return;

}



// Client Resource Cleanup

try {

stub._getServiceClient().cleanupTransport();

stub._getServiceClient().cleanup();

stub.cleanup();

} catch (AxisFault e) {

System.out.println("Unable to Instantiate Client Stub " + e.getMessage());

e.printStackTrace();

}

stub = null;

}





Issue 1 : Sometime it runs successfully and getting response from Server, but there are extra threads in system with following exception:

----- Extra threads found: -----

"MultiThreadedHttpConnectionManager cleanup" daemon:

at java.lang.Object.wait(Native Method)

at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)

at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ReferenceQueueThread.run( MultiThreadedHttpConnectionManager.java:1082)





Issue 2 : Some time it fails with followint exception:

org.apache.axis2.AxisFault: Software caused connection abort: socket write error

at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)

at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)

at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)

at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(Commons HTTPTransportSender.java:327)

at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSend er.java:206)

at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)

at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)

at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java: 211)

at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

at com.MyServiceStub.myOperation(MyServiceStub.java:572)


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at junit.framework.TestCase.runTest(TestCase.java:164)

at junit.framework.TestCase.runBare(TestCase.java:130)

at junit.framework.TestResult$1.protect(TestResult.java:110)

at junit.framework.TestResult.runProtected(TestResult.java:128)

at junit.framework.TestResult.run(TestResult.java:113)

at junit.framework.TestCase.run(TestCase.java:120)

at junit.framework.TestSuite.runTest(TestSuite.java:228)

at junit.framework.TestSuite.run(TestSuite.java:223)

at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38 )

at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Caused by: java.net.SocketException: Software caused connection abort: socket write error

at java.net.SocketOutputStream.socketWrite0(Native Method)

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)

at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)

at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)

at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)

at org.apache.commons.httpclient.ChunkedOutputStream.flush(ChunkedOutputStream.java:190)

at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosi ngMethod.java:502)

at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)

at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)




What may be the cause of above issues.

Please give me some pointer and help me to fix above issues.