This content has been marked as final. Show 3 replies
i'm not sure if this will work for how you use jaxws, but you can set a custom socket factory (configured with a custom ssl context) on a jaxws client using something like:1 person found this helpful
(this is specific to the sun/oracle jaxws implementation).
In 1.6 I believe you can set a custom default SSLContext. So you do that and equip it with a custom KeyManager that you can control externally to tell it which keystore alias to use.
Just to close the loop on this (and for the next person trying to figure out how to do it), I was able to [extend X509KeyManager as described in Alexandre Saudate's blog|http://alesaudate.com/2010/08/09/how-to-dynamically-select-a-certificate-alias-when-invoking-web-services/] . I was then able to set the com.sun.xml.ws.developer.JAXWSProperties.SSL_SOCKET_FACTORY on my JAX-WS request context to use my custom SSLSocketFactory, and it works like a charm!