aspose file tools
The moose likes BEA/Weblogic and the fly likes webservices client over SSL problems Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Reply Bookmark "webservices client over SSL problems" Watch "webservices client over SSL problems" New topic
Author

webservices client over SSL problems

Karthik Mohan
Greenhorn

Joined: Sep 29, 2004
Posts: 23
Hi Everyone,

I have a webservice implemented on Weblogic 8.1 SP3 and I am writing a java standalone client which calls this webservice over SSL. There is a webserver infront of the appserver (firewall kinda) which forwards all the requests to the appserver.

The setup works without any problems over HTTP, but I am not able to get HTTPS working. A .NET client works fine over HTTPS on the same setup.

I basically get a Connection timeout error. I am using the client proxy stub classes generated by weblogic itself.

The command that I am using to execute my client is :



D:\tmp_programs>java -cp "myService.jar;D:\bea\weblogic81\server\lib\web logic.jar;D:\bea\weblogic81\server\lib\webserviceclient+ssl.jar;%CLASSPATH%" -Dweblogic.se curity.SSL.ignoreHostnameVerify=true -Dweblogic.webservice.security.verbose=true -Dweblogi c.webservice.client.verbose=true -Dweblogic.webservice.client.ssl.strictcertchecking=false -Dweblogic.security.SSL.trustedCAKeyStore=cacerts test
Test SSLAdapter verbose output enabled
Strict cert checking disabled by default
Disabling strict checking on adapter weblogic.webservice.client.WLSSLAdapter@1f1fba0
Set TrustManager to weblogic.webservice.client.BaseWLSSLAdapter$NullTrustManager@1901437
Set HostnameVerifier to weblogic.webservice.client.WLSSLAdapter$NullVerifier@145c859
Got new socketfactory javax.net.ssl.impl.SSLSocketFactoryImpl@10b9279 Connecting to:xxxx.com port:443 socket:Socket[addr=xxxx.com/xx.xx.xx.xx,port=443,localport=2294]com.certicom.tls.interfaceimpl.TLSConnectionImp l@18166e5 Warning: cert chain untrusted Warning: subject (xxxx.com, OU=Terms of use at www.verisign.com/rpa (c)0 0, OU=xxxx, O=xxxx, L=xxx, ST=xxx, C=US) does not match server name (null) <May 19, 2005 4:24:36 PM EDT> <Info> <WebService> <BEA-220048> <May 19, 2005 4:24:36 PM EDT> <Info> <WebService> <BEA-220034>



The warning messages say that the server name does not match, but actually they match. Using the same name i am able to retrieve the WSDL through the browser without any problems. (using HTTPS)



The code snippet inside my program is:

System.setProperty("javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl"); System.setProperty("java.protocol.handler.pkgs", "weblogic.webservice.client"); SSLAdapterFactory adapterFactory = SSLAdapterFactory.getDefaultFactory(); WLSSLAdapter adapter = (WLSSLAdapter) adapterFactory.getSSLAdapter(); adapter.setStrictChecking(false); adapter.setTrustedCertifcatesFile("mycert.pem"); adapterFactory.setDefaultAdapter(adapter); adapterFactory.setUseDefaultAdapter(true); MyService service = new MyService_Impl("https://xxxx.com/webservice/test?WSDL"); MyServicePort port = service.getMyServicePort();

Any suggestions would be really helpful.

TIA karthik

[ May 19, 2005: Message edited by: Karthik M ]
[ May 19, 2005: Message edited by: Karthik M ]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: webservices client over SSL problems
 
Similar Threads
Urgent! (Very IMP) Implementing client on SSL in webservices!!!
Invoking an https web service
Problems with SSL, certification import problems.
Client certificate not getting passed to remote server
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated