[jboss-user] [JBoss Web Services] - Call web services with different certificates

Mats Andersson do-not-reply at jboss.com
Tue Feb 8 08:10:50 EST 2011


Mats Andersson [http://community.jboss.org/people/matz75] created the discussion

"Call web services with different certificates"

To view the discussion, visit: http://community.jboss.org/message/586191#586191

--------------------------------------------------------------
I want to call two different web services that uses two different SSL certificates.
The certificates are real certificates and not self signed.

The question is how to do this.
i can't use System.setProperty("javax.net.ssl.keyStore", path)

in Jboss 4 you could do like this:
UserInterface ui = new SoapService().getUserInterfacePort();
BindingProvider bp = (BindingProvider) ui;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY," https://test.com/SoapService https://test.com/SoapService");

bp.getRequestContext().put("org.jboss.ws.keyStore", path);
bp.getRequestContext().put("org.jboss.ws.keyStoreType", );
bp.getRequestContext().put("org.jboss.ws.keyStorePassword", "password");

ui.doSomething();

This doesnt work in jboss 6, i get a HTTP 500 from the web service server.
I have also tried bp.getRequestContext().put("javax.net.ssl.keyStore", path)
with the same result.

I have found one solution where you use your own SSLSocketFactory but that is no good solution since i will be needing to do the XML sending and parsing myself.
What i want is a nice solution with JAX-WS, if that is possible.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/586191#586191]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110208/ce8b05bf/attachment.html 


More information about the jboss-user mailing list