DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008

    Angry Axis 2.1.3 - WSDL2Java Client stub issues


    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());



    // 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());



    } catch (RemoteException re) {

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



    } catch (Exception e) {

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




    // Client Resource Cleanup

    try {




    } catch (AxisFault e) {

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



    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.

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    In both issues, you use the word "sometimes"

    This infers that sometimes it works and sometimes it doesn't.

    Can you determine any consistencies in the situations where it doesn't work?

  3. #3
    Join Date
    Jun 2008
    I have fixed Issue 2, But Issue 1 still exists.

    Actully, I am using Junit in my test environment and above code snippet is from my Junit class, where i initialize stub and send request to my Webservice. Recently i observed, only first test case is failing with this error, rest all are fine. Even if i use the same test case twice (for example method testCase1 and testCase2), In other word testCase2 is replica of testCase1. Only the first one is failing.

    Basically, i am looking for if i am doing something wrong in stub cleanup ??? But then, How come 2nd test case is working fine ???

Similar Threads

  1. AXIS C++ Help
    By shawnbruman in forum C++
    Replies: 0
    Last Post: 03-29-2006, 12:44 PM
  2. Replies: 0
    Last Post: 12-26-2005, 06:16 AM
  3. Replies: 0
    Last Post: 08-23-2002, 02:58 PM
  4. Client Connectivity through ODBC issues
    By Qbert in forum Database
    Replies: 1
    Last Post: 08-28-2001, 02:27 PM
  5. Replies: 0
    Last Post: 01-09-2001, 12:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.