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 ]