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 MDee <md...@cardeatech.com> on 2010/03/27 18:31:43 UTC

Axis2 with SSL gives AxisFault

I'm having trouble getting Axis2 to work with SSL.  In actuality, we are
using IIS as the web server and tomcat with Axis2 to handle web services
through Axis2 client.  The isapi_redirector seems to be working fine in
having IIS as the front-end for tomcat.

Over port 8080 everything works fine. Can access web service from browser
and Axis2 client.

Over port 80 everything works fine. Can access web service from browser and
Axis2 client.  IIS and tomcat seem to work fine with the isapi_redirector.

With port 443 (or just using https), the browser can access the web service
but not the Axis2 client.  We are using Java 5, Axis2-1.5.1, IIS 6, tomcat
6.0.24.  We have a real certificate (from cert authority GoDaddy) - not a
self signed cert.

Doing the following works:
https://mydomain/axis2/services/MyWebServices?mymethod

However the Axis2 client fails with the exception shown below.

Been stuck on this for a few days.  Any help would be great.

Thanks,
Mike




org.apache.axis2.AxisFault: Read timed out
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
	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 ....


Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:129)
	at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
	at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:739)
	at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
	at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
	at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
	at
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
	at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
	at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
	at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
	at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
	at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)Mar
27, 2010 09:47  [Thread-1] 
...
-- 
View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28053938.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 with SSL gives AxisFault

Posted by MDee <md...@cardeatech.com>.
Sumedha,

The client code is a POJO.  The stubs were created by wsdl2java.

Not doing anything with a keystore.  I thought a keystore would only be
necessary for non-authenticated certificate (such a self-signed).  We are
using a signed certificate.  Maybe my understanding is wrong about this. 
But I think the exception would not be different anyway.

Mike


>Mike,
>I think the problem is in your client code.
>I believe your creating a secure connection to the HTTPS end point by
>providing a keystore?
>Share your client code here.
>
>/sumedha

-- 
View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28056613.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 with SSL gives AxisFault

Posted by sumedha rubasinghe <su...@gmail.com>.
Mike,
I think the problem is in your client code.
I believe your creating a secure connection to the HTTPS end point by
providing a keystore?
Share your client code here.

/sumedha



On Sat, Mar 27, 2010 at 11:01 PM, MDee <md...@cardeatech.com> wrote:
>
> I'm having trouble getting Axis2 to work with SSL.  In actuality, we are
> using IIS as the web server and tomcat with Axis2 to handle web services
> through Axis2 client.  The isapi_redirector seems to be working fine in
> having IIS as the front-end for tomcat.
>
> Over port 8080 everything works fine. Can access web service from browser
> and Axis2 client.
>
> Over port 80 everything works fine. Can access web service from browser and
> Axis2 client.  IIS and tomcat seem to work fine with the isapi_redirector.
>
> With port 443 (or just using https), the browser can access the web service
> but not the Axis2 client.  We are using Java 5, Axis2-1.5.1, IIS 6, tomcat
> 6.0.24.  We have a real certificate (from cert authority GoDaddy) - not a
> self signed cert.
>
> Doing the following works:
> https://mydomain/axis2/services/MyWebServices?mymethod
>
> However the Axis2 client fails with the exception shown below.
>
> Been stuck on this for a few days.  Any help would be great.
>
> Thanks,
> Mike
>
>
>
>
> org.apache.axis2.AxisFault: Read timed out
>        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
>        at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
>        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 ....
>
>
> Caused by: java.net.SocketTimeoutException: Read timed out
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
>        at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
>        at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
>        at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:739)
>        at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
>        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>        at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
>        at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
>        at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
>        at
> org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
>        at
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
>        at
> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
>        at
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
>        at
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
>        at
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)Mar
> 27, 2010 09:47  [Thread-1]
> ...
> --
> View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28053938.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>

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


Re: Axis2 with SSL gives AxisFault

Posted by Amila Suriarachchi <am...@gmail.com>.
On Wed, Mar 31, 2010 at 1:33 AM, MDee <md...@cardeatech.com> wrote:

>
> Could this be the solution?  I added this line after creating the stub.
>
> ws._getServiceClient().getOptions().setProperty( HTTPConstants.CHUNKED,
> "false" );
>
> It seems to work!  Don't know why though.
>

May be a problem with IIS handling chunking.

>
> http://blog.roweware.com/2007/09/18/axis2-iis-woes/
>
> So far it seems to work.
>
> Mike
>
> --
> View this message in context:
> http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28087688.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Axis2 with SSL gives AxisFault

Posted by MDee <md...@cardeatech.com>.
Could this be the solution?  I added this line after creating the stub.

ws._getServiceClient().getOptions().setProperty( HTTPConstants.CHUNKED,
"false" );

It seems to work!  Don't know why though.

http://blog.roweware.com/2007/09/18/axis2-iis-woes/

So far it seems to work.

Mike

-- 
View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28087688.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 with SSL gives AxisFault

Posted by MDee <md...@cardeatech.com>.
>is this working when directly invoke the tomcat 8443 port with https?
>
>Since this request hit the AxisServlet within the tomcat server you can
>debug it. For this you can
>download the source code and start debuging AxisServlet class post method.

IIS handles all HTTP/HTTPS operations via the ISAPI.  Didn't install the
certificate into Tomcat (just IIS).  In actuality, the problem is a little
more general than initially stated in that the client doesn't work even on
port 80.

I thought about downloading the source.  I don't want to go there.  Expect
Axis2 to simply work.  Instead I'd rather hire someone to help with this.

-- 
View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28083995.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 with SSL gives AxisFault

Posted by Amila Suriarachchi <am...@gmail.com>.
On Tue, Mar 30, 2010 at 12:57 AM, MDee <md...@cardeatech.com> wrote:

>
> Just turned on logging - on server side.  Compared calling web service from
> browser versus client.  Not sure if I'm grasping at straws.  Is there
> anything unusual that can be seen in there?
>
> When called from the client, the following were logged by tomcat.  Time out
> occurred on the client side.
>
> Mar 29, 2010 15:10  [TP-Processor3]
>
> org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:365)
> Input
> contentType (application/soap+xml; charset=UTF-8;
> action="urn:getNextQueueEntry")
> Mar 29, 2010 15:10  [TP-Processor3]
>
> org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:406)
> CharSetEncoding from content-type (UTF-8)
> Mar 29, 2010 15:10  [TP-Processor3]
>
> org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:
> 194) createSOAPEnvelope using Builder (class
> org.apache.axis2.builder.SOAPBuilder) selected from type
> (application/soap+xml)
>

is this working when directly invoke the tomcat 8443 port with https?

Since this request hit the AxisServlet within the tomcat server you can
debug it. For this you can
download the source code and start debuging AxisServlet class post method.

thanks,
Amila.

>
> When called from the browser, everything worked.  The first dozen or so
> logged lines follow.
>
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:365)
> Input
> contentType (application/x-www-form-urlencoded)
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:381)
> CharSe
> tEncoding defaulted (UTF-8)
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.dispatchers.RequestURIBasedServiceDispatcher.findService(RequestURI
> BasedServiceDispatcher.java:50) [MessageContext:
> logID=urn:uuid:353830F4C1C3FEB0AC1269889717056] Checking for Service us
> ing target endpoint address :
> /axis2/services/MyWebServices/getNextQueueEntry?client=bas
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.util.Utils.parseRequestURLForServiceAndOperation(Utils.java:204)
> pa
> rseRequestURLForServiceAndOperation :
>
> [/axis2/services/MyWebServices/getNextQueueEntry?client=bas][/axis2/services]
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.i18n.ProjectResourceBundle.handleGetObject(ProjectResourceBundle.ja
> va:70) org.apache.axis2.i18n.resource::handleGetObject(servicefound)
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:98)
> [Messa
> geContext: logID=urn:uuid:353830F4C1C3FEB0AC1269889717056] Found
> AxisService
> : MyWebServices
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.util.Utils.parseRequestURLForServiceAndOperation(Utils.java:204)
> pa
> rseRequestURLForServiceAndOperation :
>
> [/axis2/services/MyWebServices/getNextQueueEntry?client=bas][/axis2/services]
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.dispatchers.RequestURIBasedOperationDispatcher.findOperation(Reques
> tURIBasedOperationDispatcher.java:59) [MessageContext:
> logID=urn:uuid:353830F4C1C3FEB0AC1269889717056] Checking for Operation
> using
> QName(target endpoint URI fragment) : getNextQueueEntry
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.description.AxisService.getOperation(AxisService.java:1688)
> Get operation for getNextQueueEntry
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.description.AxisService.getOperation(AxisService.java:1731)
> Found a
> xis operation:  org.apache.axis2.description.InOutAxisOperation@155d4be
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.i18n.ProjectResourceBundle.handleGetObject(ProjectResourceBundle.ja
> va:70) org.apache.axis2.i18n.resource::handleGetObject(operationfound)
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:110)
> [Mess
> ageContext: logID=urn:uuid:353830F4C1C3FEB0AC1269889717056] Found
> AxisOperation : getNextQueueEntry
> Mar 29, 2010 15:08  [TP-Processor3]
>
> org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:
> 194) createSOAPEnvelope using Builder (class
> org.apache.axis2.builder.XFormURLEncodedBuilder) selected from type
> (application/x-www-form-urlencoded)
> --
> View this message in context:
> http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28073985.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Axis2 with SSL gives AxisFault

Posted by MDee <md...@cardeatech.com>.
Oh, and here's the log if port 8080 is used (without the isapi_redirector
between Tomcat and IIS).  This works too.

Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:365)
Input contentType (application/soap+xml; charset=UTF-8;
action="urn:getNextQueueEntry")
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:406)
CharSetEncoding from content-type (UTF-8)
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:194)
createSOAPEnvelope using Builder (class
org.apache.axis2.builder.SOAPBuilder) selected from type
(application/soap+xml)
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:329)
char set encoding set from default =UTF-8
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:278)
Starting to process SOAP 1.2 message
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:240)
Build the OMElement Envelope by the StaxSOAPModelBuilder
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:240)
Build the OMElement Body by the StaxSOAPModelBuilder
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.dispatchers.RequestURIBasedServiceDispatcher.findService(RequestURIBasedServiceDispatcher.java:50)
[MessageContext: logID=urn:uuid:353830F4C1C3FEB0AC1269891007588] Checking
for Service using target endpoint address :
http://mydomain.com:8080/axis2/services/MyWebServices
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.util.Utils.parseRequestURLForServiceAndOperation(Utils.java:204)
parseRequestURLForServiceAndOperation :
[http://mydomain.com:8080/axis2/services/MyWebServices][/axis2/services]
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.i18n.ProjectResourceBundle.handleGetObject(ProjectResourceBundle.java:70)
org.apache.axis2.i18n.resource::handleGetObject(servicefound)
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:98)
[Message Context: logID=urn:uuid:353830F4C1C3FEB0AC1269891007588] Found
AxisService : MyWebServices
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.dispatchers.ActionBasedOperationDispatcher.findOperation(ActionBasedOperationDispatcher.java:43)
[MessageContext: logID=urn:uuid:353830F4C1C3FEB0AC1269891007588] Checking
for Operation using Action : urn:getNextQueueEntry
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.description.AxisService.getOperationBySOAPAction(AxisService.java:1792)
getOperationBySOAPAction: Operation
(org.apache.axis2.description.InOutAxisOperation@155d4be,getNextQueueEntry)
for soapAction: urn:getNextQueueEntry found in action map.
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.i18n.ProjectResourceBundle.handleGetObject(ProjectResourceBundle.java:70)
org.apache.axis2.i18n.resource::handleGetObject(operationfound)
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:110)
[MessageContext: logID=urn:uuid:353830F4C1C3FEB0AC1269891007588] Found
AxisOperation : getNextQueueEntry
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.addressing.AddressingHelper.getAddressingRequirementParemeterValue(AddressingHelper.java:161)
getAddressingRequirementParemeterValue: value: 'null'
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.addressing.AddressingHelper.getInvocationPatternParameterValue(AddressingHelper.java:186)
getInvocationPatternParameterValue: value: 'null'
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher.invoke(MustUnderstandValidationDispatcher.java:76)
JAXWS MustUnderstandValidationDispatcher.invoke on AxisService
MyWebServices; AxisOperation
org.apache.axis2.description.InOutAxisOperation@155d4be
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.addressing.AddressingHelper.isReplyRedirected(AddressingHelper.java:97)
[MessageContext: logID=urn:uuid:353830F4C1C3FEB0AC1269891007588]
isReplyRedirected: ReplyTo is null. Returning false
Mar 29, 2010 15:30  [http-8080-1]
org.apache.axis2.context.ConfigurationContext.unregisterOperationContext(ConfigurationContext.java:352)
messageID is null.


-- 
View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28074109.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 with SSL gives AxisFault

Posted by MDee <md...@cardeatech.com>.
Just turned on logging - on server side.  Compared calling web service from
browser versus client.  Not sure if I'm grasping at straws.  Is there
anything unusual that can be seen in there?

When called from the client, the following were logged by tomcat.  Time out
occurred on the client side.

Mar 29, 2010 15:10  [TP-Processor3]
org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:365)
Input
contentType (application/soap+xml; charset=UTF-8;
action="urn:getNextQueueEntry")
Mar 29, 2010 15:10  [TP-Processor3]
org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:406)
CharSetEncoding from content-type (UTF-8)
Mar 29, 2010 15:10  [TP-Processor3]
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:
194) createSOAPEnvelope using Builder (class
org.apache.axis2.builder.SOAPBuilder) selected from type
(application/soap+xml)

When called from the browser, everything worked.  The first dozen or so
logged lines follow.

Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:365)
Input
contentType (application/x-www-form-urlencoded)
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.builder.BuilderUtil.getCharSetEncoding(BuilderUtil.java:381)
CharSe
tEncoding defaulted (UTF-8)
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.dispatchers.RequestURIBasedServiceDispatcher.findService(RequestURI
BasedServiceDispatcher.java:50) [MessageContext:
logID=urn:uuid:353830F4C1C3FEB0AC1269889717056] Checking for Service us
ing target endpoint address :
/axis2/services/MyWebServices/getNextQueueEntry?client=bas
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.util.Utils.parseRequestURLForServiceAndOperation(Utils.java:204)
pa
rseRequestURLForServiceAndOperation :
[/axis2/services/MyWebServices/getNextQueueEntry?client=bas][/axis2/services]
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.i18n.ProjectResourceBundle.handleGetObject(ProjectResourceBundle.ja
va:70) org.apache.axis2.i18n.resource::handleGetObject(servicefound)
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:98)
[Messa
geContext: logID=urn:uuid:353830F4C1C3FEB0AC1269889717056] Found AxisService
: MyWebServices
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.util.Utils.parseRequestURLForServiceAndOperation(Utils.java:204)
pa
rseRequestURLForServiceAndOperation :
[/axis2/services/MyWebServices/getNextQueueEntry?client=bas][/axis2/services]
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.dispatchers.RequestURIBasedOperationDispatcher.findOperation(Reques
tURIBasedOperationDispatcher.java:59) [MessageContext:
logID=urn:uuid:353830F4C1C3FEB0AC1269889717056] Checking for Operation using
QName(target endpoint URI fragment) : getNextQueueEntry
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.description.AxisService.getOperation(AxisService.java:1688)
Get operation for getNextQueueEntry
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.description.AxisService.getOperation(AxisService.java:1731)
Found a
xis operation:  org.apache.axis2.description.InOutAxisOperation@155d4be
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.i18n.ProjectResourceBundle.handleGetObject(ProjectResourceBundle.ja
va:70) org.apache.axis2.i18n.resource::handleGetObject(operationfound)
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.engine.AbstractDispatcher.invoke(AbstractDispatcher.java:110)
[Mess
ageContext: logID=urn:uuid:353830F4C1C3FEB0AC1269889717056] Found
AxisOperation : getNextQueueEntry
Mar 29, 2010 15:08  [TP-Processor3]
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:
194) createSOAPEnvelope using Builder (class
org.apache.axis2.builder.XFormURLEncodedBuilder) selected from type
(application/x-www-form-urlencoded)
-- 
View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28073985.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 with SSL gives AxisFault

Posted by MDee <md...@cardeatech.com>.
When I turn on logging, I get a little more info.  This appears to be from
Axis2:

Mar 28, 2010 20:17  [Thread-1]
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:508)
Request body sent 
Mar 28, 2010 20:17  [Thread-1]
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:826)
enter HttpConnection.flushRequestOutputStream() 
Mar 28, 2010 20:17  [Thread-1]
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1730)
enter HttpMethodBase.readResponse(HttpState, HttpConnection) 
Mar 28, 2010 20:17  [Thread-1]
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1964)
enter HttpMethodBase.readStatusLine(HttpState, HttpConnection) 
Mar 28, 2010 20:17  [Thread-1]
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1113)
enter HttpConnection.readLine() 
Mar 28, 2010 20:17  [Thread-1]
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105) enter
HttpParser.readLine(InputStream, String) 
Mar 28, 2010 20:17  [Thread-1]
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:74)
enter HttpParser.readRawLine() 

It times out after HttpParser.readRawLine().  I increased the timeout to 60
seconds (the operation should take only a few seconds at most).  And then
this appears in the log (note SSL logging is turned on too).

Thread-1, handling exception: java.net.SocketTimeoutException: Read timed
out
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:404)
Closing the connection. 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.HttpConnection.close(HttpConnection.java:1148)
enter HttpConnection.close() 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.HttpConnection.closeSocketAndStreams(HttpConnection.java:1215)
enter HttpConnection.closeSockedAndStreams() 
Thread-1, called close()
Thread-1, called closeInternal(true)
Thread-1, SEND TLSv1 ALERT:  warning, description = close_notify
Thread-1, WRITE: TLSv1 Alert, length = 18
Thread-1, called close()
Thread-1, called closeInternal(true)
Thread-1, called close()
Thread-1, called closeInternal(true)
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:434)
Method retry handler returned false. Automatic recovery will not be
attempted 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.HttpConnection.releaseConnection(HttpConnection.java:1174)
enter HttpConnection.releaseConnection() 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.HttpConnection.releaseConnection(HttpConnection.java:1178)
Releasing connection back to connection manager. 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.releaseConnection(MultiThreadedHttpConnectionManager.java:630)
enter HttpConnectionManager.releaseConnection(HttpConnection) 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool.freeConnection(MultiThreadedHttpConnectionManager.java:979)
Freeing connection, hostConfig=HostConfiguration[host=https://mydomain.com] 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool.getHostPool(MultiThreadedHttpConnectionManager.java:805)
enter HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration) 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.util.IdleConnectionHandler.add(IdleConnectionHandler.java:76)
Adding connection at: 1269832692171 
Mar 28, 2010 20:18  [Thread-1]
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool.notifyWaitingThread(MultiThreadedHttpConnectionManager.java:961)
Notifying no-one, there are no waiting threads 
Mar 28, 2010 20:18  [Thread-1]
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:202)
Unable to sendViaPost to
url[https://mydomain.com/axis2/services/MyWebServices.MyWebServicesHttpSoap12Endpoint/] 
java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)

-- 
View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28064610.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 with SSL gives AxisFault

Posted by MDee <md...@cardeatech.com>.
Amila,

What is EPR?

The client code works with HTTP.  Doesn't work with HTTPS.  I can call the
web service through the browser with either http or https successfully.

The code used in the client is exactly the same for HTTP and HTTPS, except I
changed the domain (URL) of the client from http://mydomain.com/axis2/... to
https://mydomain.com/axis2...

Mike

>This seems to be a problem with EPR. have you given the url correctly and
is
>it accessible from the client?
>
>thanks,
>Amila.

-- 
View this message in context: http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28057270.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: Axis2 with SSL gives AxisFault

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sat, Mar 27, 2010 at 11:01 PM, MDee <md...@cardeatech.com> wrote:

>
> I'm having trouble getting Axis2 to work with SSL.  In actuality, we are
> using IIS as the web server and tomcat with Axis2 to handle web services
> through Axis2 client.  The isapi_redirector seems to be working fine in
> having IIS as the front-end for tomcat.
>
> Over port 8080 everything works fine. Can access web service from browser
> and Axis2 client.
>
> Over port 80 everything works fine. Can access web service from browser and
> Axis2 client.  IIS and tomcat seem to work fine with the isapi_redirector.
>
> With port 443 (or just using https), the browser can access the web service
> but not the Axis2 client.  We are using Java 5, Axis2-1.5.1, IIS 6, tomcat
> 6.0.24.  We have a real certificate (from cert authority GoDaddy) - not a
> self signed cert.
>
> Doing the following works:
> https://mydomain/axis2/services/MyWebServices?mymethod
>
> However the Axis2 client fails with the exception shown below.
>
> Been stuck on this for a few days.  Any help would be great.
>
> Thanks,
> Mike
>
>
>
>
> org.apache.axis2.AxisFault: Read timed out
>        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
>

This seems to be a problem with EPR. have you given the url correctly and is
it accessible from the client?

thanks,
Amila.


>        at
> org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)
>        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 ....
>
>
> Caused by: java.net.SocketTimeoutException: Read timed out
>        at java.net.SocketInputStream.socketRead0(Native Method)
>        at java.net.SocketInputStream.read(SocketInputStream.java:129)
>        at
> com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
>        at
> com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
>        at
>
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
>        at
>
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:739)
>        at
> com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
>        at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>        at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
>        at
> org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
>        at
> org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
>        at
>
> org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
>        at
>
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
>        at
>
> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
>        at
>
> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
>        at
>
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
>        at
>
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)Mar
> 27, 2010 09:47  [Thread-1]
> ...
> --
> View this message in context:
> http://old.nabble.com/Axis2-with-SSL-gives-AxisFault-tp28053938p28053938.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/