You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2009/07/03 20:57:47 UTC

[jira] Resolved: (AXIS2-4419) org.apache.axis2.AxisFault: Connection timed out: connect-In Two ssl Communication

     [ https://issues.apache.org/jira/browse/AXIS2-4419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4419.
------------------------------------

    Resolution: Invalid

Subba,

You are using the Axis2 architecture in an incorrect way. Your code actually does the following: in the middle of the out flow, it sends the request to some endpoint and substitutes the SOAP envelope in the message context with the response received from that endpoint. Axis2 will then continue the flow as if that message was a request message and in particular invoke the transport sender. This is where you get the error.

As I said above, sending the message to an endpoint is the role of a transport sender, not a handler. I would recommend the following:

- Check if your requirements can be satisfied by the existing HTTP transport.
- If that's not the case, check what enhancement would be required. If it's sufficiently general, maybe we can extend the transport to support your use case.
- If it is not possible to support your use case with the existing HTTP transport, write your own transport implementation.

I would also recommend you to read the Architecture Guide [1] and/or Deepal Jayasinghe's book "Quickstart Apache Axis2" to get a better understanding of the Axis2 architecture.

[1] http://ws.apache.org/axis2/1_5/Axis2ArchitectureGuide.html

> org.apache.axis2.AxisFault: Connection timed out: connect-In Two ssl Communication
> ----------------------------------------------------------------------------------
>
>                 Key: AXIS2-4419
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4419
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.4.1
>         Environment: Windows Xp,Axis2-1.4.1
>            Reporter: subbaraj jeganathan
>         Attachments: SOI-2-WAY-SSL.zip
>
>
> I have come up with client side handler using axis2-1.4.1 for accessing accessing two-way ssl enabled service. I have come with handler with name  called SOISender and configured the same handler for inflow,outflow,infault flow and outfaultflow.Also i was able to successfully engage the client side handler using module.
> Inflow Handler:
> ===========
>    1. Creating opening sslsocket- which is taking care two-way ssl handshake
>    2. Writing the Soap Message to socket.-which is taking care of getting the soap message from messagecontext and posting the message to service.
>    3 Reading the soap message from socket-Which is taking care of reading the soap response envelope from soket input stream
> Client Stub Creation-
> ===============
>   1. Im creating the stup by passing configuration context and url.
>     configContext= ConfigurationContextFactory.createConfigurationContextFromFileSystem(pathToRepository,null); 	     soiServiceStub= new SOIServiceStub(configContext,url);
> Problem Statement:-
> ===============
>     1. while calling the webservice method using stub.someBusinessMethod(someObject), the inflow is called and it takes cares ssl handshake,sslsocket creation,getting soapenvelope from messagecontxt and writing the soapenvelope to socket outputstream.
> 2. Also it gets the response from socket input stream and  sets the response soapenvelope back to messagecontext.
> 3.Then the call is going back to the stub.But stub will not return anything back to client or caller. it hangs and after a while it throws the following exception
> soapResponseEnvelope11::<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><urn:lookupResponse xmlns:urn="urn:oasis:names:tc:SPML:2:0" status="failure" error="malformedRequest"><urn:errorMessage>Error parsing payload to retrieve LookUp
> </urn:errorMessage></urn:lookupResponse></soapenv:Body></soapenv:Envelope>
> soapResponseHeader>>>>>::null
> soapResponseBody::<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><urn:lookupResponse xmlns:urn="urn:oasis:names:tc:SPML:2:0" status="failure" error="malformedRequest"><urn:errorMessage>Error parsing payload to retrieve LookUp
> </urn:errorMessage></urn:lookupResponse></soapenv:Body>
> soapResponseVersion::org.apache.axiom.soap.SOAP11Version@145f0e3
> soapResponseBodyFirstElement::lookupResponse
> soapResponseEnvelope>>>>>>::<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><urn:lookupResponse xmlns:urn="urn:oasis:names:tc:SPML:2:0" status="failure" error="malformedRequest"><urn:errorMessage>Error parsing payload to retrieve LookUp
> </urn:errorMessage></urn:lookupResponse></soapenv:Body></soapenv:Envelope>
> SOISenderInFlow.invoke: finished reading response from server
> SOISenderInFlow.InvocationResponse: Method Ends..........
> org.apache.axis2.AxisFault: Connection timed out: connect
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.jpmchase.tss.soi.ssl.SOIServiceStub.lookupRequest(SOIServiceStub.java:328)
> 	at com.jpmchase.tss.soi.ssl.SOIServiceClient.main(SOIServiceClient.java:68)
> Caused by: java.net.ConnectException: Connection timed out: connect
> 	at java.net.PlainSocketImpl.socketConnect(Native Method)
> 	at java.net.PlainSocketImpl.doConnect(Unknown Source)
> 	at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
> 	at java.net.PlainSocketImpl.connect(Unknown Source)
> 	at java.net.SocksSocketImpl.connect(Unknown Source)
> 	at java.net.Socket.connect(Unknown Source)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
> 	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
> 	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
> 	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
> 	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:189)
> 	... 9 more
> java.lang.NullPointerException
> 	at com.jpmchase.tss.soi.ssl.SOIServiceStub.lookupRequest(SOIServiceStub.java:341)
> 	at com.jpmchase.tss.soi.ssl.SOIServiceClient.main(SOIServiceClient.java:68)
>   

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