axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <stephen.hindma...@bt.com>
Subject RE: [axis2] AxisFault "Transport out has not been set" with self signed certificates
Date Thu, 23 Aug 2007 16:38:52 GMT
I advanced a bit by adding the transport sender with these lines

	TransportSender tSender=new CommonsHTTPTransportSender();
	TransportOutDescription tOutDesc=new
TransportOutDescription("myssl");
	tOutDesc.setSender(tSender);
	tOutDesc.addParameter(
	    new Parameter(
		HTTPConstants.PROTOCOL_VERSION
		,HTTPConstants.HEADER_PROTOCOL_11));
	tOutDesc.addParameter(new
Parameter("Transfer-Encoding","chunked"));
	ServiceClient serviceClient=stub._getServiceClient();
	AxisConfiguration
axisConfig=serviceClient.getAxisConfiguration();
	axisConfig.addTransportOut(tOutDesc);

This time I got the following exception:-

Caught org.apache.axis2.AxisFault: unknown protocol: myssl
org.apache.axis2.AxisFault: unknown protocol: myssl
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
	at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:330)
 	at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
sHTTPTransportSender.java:206)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)

Which ties in with something in another thread
http://mail-archives.apache.org/mod_mbox/ws-axis-user/200704.mbox/%3c100
24008.post@talk.nabble.com%3e

It suggests that the CommonsHTTPTransportSender ignores the newly
registered protocol "myssl" and so cannot find the custom socket
factory. Is this a bug?

The workaround is to register the protocol against "https", which allows
the transport sender to find the socket factory, but this is not
satisfactory as I may not want to use the custom (and rather insecure)
socket factory in all cases.

Steve Hindmarch

One IT - iBridge Development

> -----Original Message-----
> From: stephen.hindmarch@bt.com [mailto:stephen.hindmarch@bt.com] 
> Sent: 23 August 2007 13:59
> To: axis-user@ws.apache.org
> Subject: [axis2] AxisFault "Transport out has not been set" 
> with self signed certificates
> 
> I have been having a problem getting my client application to work
> against a server that uses an SSL connector and self-signed
> certificates.
> 
> I get this error raised whenever I connect to the SSL port, 
> the standard
> port works fine.
> 
> Caught org.apache.axis2.AxisFault: Transport out has not been set
> org.apache.axis2.AxisFault: Transport out has not been set
>     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:383)
>     at
> org.apache.axis2.description.OutInAxisOperationClient.send(Out
> InAxisOper
> ation.java:374)
>     ...
> 
> I have used the method outlined in the httpclient SSL guide 
> to overcome
> the problem of the self-signed certificates raising a security error.
> This registering a new protocol and creating a customised 
> socketFactory
> to support this protocol. This means I send my requests to
> "myssl://localhost/" instead of "https://localhost:8443/".
> 
> My thought is that I should create a transportSender for the new
> protocol but I am not clear from the documentation how to do this,
> either with an axis2.xml file or progammatically (which I 
> would prefer).
> I have tried adding my own minimal axis2.xml file with just a
> transportSender in, but it does not seem to work. I am not sure if my
> application is loading the axis2.xml file.
> 
> Can anybody point me in the right direction? I have created a 
> test case
> based on the StockQuoteService sample. I have attached it. Once opened
> type "ant help" for more information.
> 
> I am using axis2 1.3
> 
> Steve Hindmarch
> 
> BT Design - iBridge Development
> 

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


Mime
View raw message