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 Ruchith Fernando <ru...@gmail.com> on 2005/08/11 20:11:14 UTC

[Axis2] Invoking a web service over HTTPS

Hi All,

I tried to access an Axis2 web service hosted in Tomcat 5,  using HTTPS.

- Enabled HTTPS connections in Tomcat on port 8443
- Tested this with a very simple commons-httpclient program
(http://rafb.net/paste/results/O86E7P67.html)
- Added CoomonsHTTPsender as the https transport in the axis2.xml
- Then tried to access a web service using a simple client which had
the same set of JSSE properties

But I get the following exception:

org.apache.axis2.AxisFault: Connection reset; nested exception is: 
	java.net.SocketException: Connection reset; nested exception is: 
	org.apache.axis2.AxisFault: Connection reset; nested exception is: 
	java.net.SocketException: Connection reset
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:146)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:87)
	at org.apache.axis2.clientapi.TwoWayTransportBasedSender.send(TwoWayTransportBasedSender.java:34)
	at org.apache.axis2.clientapi.InOutMEPClient.invokeBlocking(InOutMEPClient.java:175)
	at org.apache.axis2.clientapi.Call.invokeBlocking(Call.java:90)
	at org.ruchith.sample1.Client.testCharEnc(Client.java:144)
	at org.ruchith.sample1.Client.main(Client.java:77)
Caused by: org.apache.axis2.AxisFault: Connection reset; nested exception is: 
	java.net.SocketException: Connection reset
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:196)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:116)
	... 6 more
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:168)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
	at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
	at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
	at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1110)
	at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1824)
	at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1584)
	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:393)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:393)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.transportConfigurationPOST(CommonsHTTPTransportSender.java:424)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:174)
	... 7 more

Accoding to the common-httpclient web site
(http://jakarta.apache.org/commons/httpclient/sslguide.html) this is a
known problem with JVM < 1.4 but I'm using 1.4.2_08

Googling for the problem suggested turning off stale connection check
and using MultiThreadedHttpConnectionManager but changing the
CommonsHTTPSender with those changes also didn't work.

My client works over http ptoperly.

Has someone come across this before? Or am I missing soemthing?

Thanks in advance,
-- 
Ruchith