You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by SM <mo...@yahoo.com> on 2010/03/30 20:00:40 UTC

Invoking a webservie call from the client gives --> "main" org.apache.axis2.AxisFault: Remote host closed connection during handshake

Hi all:
  I am invoking a simple webservice call from a client and I get the following error.  Any tips for resolving this will be much appreciated.  My client code is also pasted below:
 
public class HelloWorldClient {
    public static void main(String[] args) throws Exception {

     HelloWorldServiceStub stub = new HelloWorldServiceStub(null,"https://localhost:8080/axis2/services/HelloWorldService");
  int a = 3;
  int b = 4;
  int result = stub.add(a, b);
  System.out.pritln(a + " + " + b + " = " + result);
    }
}

 
ERROR:
 
log4j:WARN No appenders could be found for logger (org.apache.axis2.description.AxisService).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.apache.axis2.AxisFault: Remote host closed connection during handshake
 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
 at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)
 at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
 at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
 at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
 at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
 at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
 at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
 at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
 at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
 at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
 at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
 at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
 at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
 at helloworld.HelloWorldServiceStub.add(HelloWorldServiceStub.java:462)
 at helloworld.HelloWorldClient.main(HelloWorldClient.java:25)
Caused by: com.ctc.wstx.exc.WstxIOException: Remote host closed connection during handshake
 at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
 at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:168)
 at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.flush(MTOMAwareXMLSerializer.java:79)
 at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:94)
 at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:738)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:966)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:995)
 at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:254)
 at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:242)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:995)
 at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:486)
 at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
 ... 19 more
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:801)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1089)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:618)
 at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
 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:191)
 at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
 at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
 at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
 ... 30 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
 at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
 ... 40 more
Disconnected from the target VM, address: '127.0.0.1:3121', transport: 'socket'
Process finished with exit code 1



      

Re: Invoking a webservie call from the client gives --> "main" org.apache.axis2.AxisFault: Remote host closed connection during handshake

Posted by SM <mo...@yahoo.com>.
I figured this never mind.  Thanks.  I used https protocol when I disabled security on the webservice.

--- On Tue, 3/30/10, SM <mo...@yahoo.com> wrote:

From: SM <mo...@yahoo.com>
Subject: Invoking a webservie call from the client gives --> "main" org.apache.axis2.AxisFault: Remote host closed connection during handshake
To: java-user@axis.apache.org
Date: Tuesday, March 30, 2010, 11:00 AM

Hi all:
  I am invoking a simple webservice call from a client and I get the following error.  Any tips for resolving this will be much appreciated.  My client code is also pasted below:
 
public class HelloWorldClient {
    public static void main(String[] args) throws Exception {

     HelloWorldServiceStub stub = new HelloWorldServiceStub(null,"https://localhost:8080/axis2/services/HelloWorldService");
  int a = 3;
  int b = 4;
  int result = stub.add(a, b);
  System.out.pritln(a + " + " + b + " = " + result);
    }
}

 
ERROR:
 
log4j:WARN No appenders could be found for logger (org.apache.axis2.description.AxisService).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.apache.axis2.AxisFault: Remote host closed connection during handshake
 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
 at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)
 at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
 at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
 at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
 at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
 at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
 at
 org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
 at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
 at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
 at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
 at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
 at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
 at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
 at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
 at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
 at helloworld.HelloWorldServiceStub.add(HelloWorldServiceStub.java:462)
 at helloworld.HelloWorldClient.main(HelloWorldClient.java:25)
Caused by: com.ctc.wstx.exc.WstxIOException: Remote host closed connection during handshake
 at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
 at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:168)
 at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.flush(MTOMAwareXMLSerializer.java:79)
 at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:94)
 at
 org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:738)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:966)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:995)
 at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:254)
 at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:242)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:995)
 at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:486)
 at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
 ... 19 more
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
 at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:801)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1089)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:618)
 at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
 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:191)
 at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
 at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
 at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
 ... 30 more
Caused by:
 java.io.EOFException: SSL peer shut down incorrectly
 at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
 at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
 ... 40 more
Disconnected from the target VM, address: '127.0.0.1:3121', transport: 'socket'
Process finished with exit code 1