axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mathieu fabre" <mathieu...@gmail.com>
Subject question about CommonHTTPTransportSender
Date Mon, 28 Apr 2008 07:36:08 GMT
Hi,

I work on a webapp and i use Axis2 to expose my services.

my webapp is managed by jetty (like tomcat but lightweight).
Jetty listen on port 8443 with HTTPS (SSL) and on port 8080 with HTTP (no
SSL)
I wrote a little client which create a RPCServiceClient to send a request.

Here a piece of code :

//Create an empty configuration context
config =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
// Create a transport out description
TransportOutDescription transpOut = new
TransportOutDescription(Constants.TRANSPORT_HTTP);
transpOut.addParameter(new Parameter(HTTPConstants.PROTOCOL_VERSION,
"HTTP/1.1"));
//create the HTTP sender
CommonsHTTPTransportSender sender = new CommonsHTTPTransportSender();
//initialize the sender
sender.init(config, transpOut);
transpOut.setSender(sender);
config.getAxisConfiguration().addTransportOut(transpOut);
//create the RPCServiceClient
RPCServiceClient serviceClient = new RPCServiceClient(config, null);
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new EndpointReference(url);
options.setTo(targetEPR);
....
run the request with invokeBlocking....
....

with HTTP, it work correctly, but i don't know what to do in order to use
HTTPS
The server does not expect to authenticate the client for the moment.
If i try to view the wsd of on of my services with mozilla, it's working (i
accept the certificate)
So i would like to do the same in the code

Do you know what i must do ...?

Thanks,

Mat

Mime
View raw message