[jboss-user] [Security & JAAS/JBoss] - Connecting to Secured WebService
alfred.rsa
do-not-reply at jboss.com
Tue May 22 14:57:49 EDT 2007
Hi
I have a piece of code that connects to secured web service using certificates. The problem is that when I use it within an application in JBoss it doesn't work anymore. Do I have to add the certificates in a different way? My code is as follows:
System.setProperty("javax.net.debug","all");
System.setProperty("java.security.debug","all");
System.setProperty("javax.net.ssl.keyStore", keystoreFilePath);
System.setProperty("javax.net.ssl.keyStorePassword", "xxx");
System.setProperty("javax.net.ssl.keyStoreType", "JKS");
System.setProperty("javax.net.ssl.trustStore", truststoreFilePath);
System.setProperty("javax.net.ssl.trustStorePassword", "xxx");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider() );
SOAPConnection soapConnection = SOAPConnectionFactory.newInstance().createConnection();
SOAPMessage responseMessage = soapConnection.call(requestMessage, url);
Regards
Alfred
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047683#4047683
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047683
More information about the jboss-user
mailing list