I have a https webservice running in weblogic 9.2. While calling that I am getting <BEA-090477> <Certificate chain received from abcserver.com -220.127.116.11 was not trusted causing SSL handshake failure.>
But when I write a standalone program with main() in my local machine and call the webservice its working fine !!. But when I write a client using the same code and put it inside a .war file and deploy in weblogic 9.2 server and then call,... it is giving the error.
This is what I did. 1. I generated the client using "weblogic.wsee.tools.anttasks.ClientGenTask" 1. downloaded the .der file from firefox after I accessed the wsld(https://abcserver.com/......wsdl). and created the keystore by keytool -import -alias servercert -file server.der -keystore server.keystore. 2. added in client code System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol"); System.setProperty("javax.net.ssl.trustStore","....../server.keystore"); System.setProperty("javax.net.ssl.trustStorePassword","password"); and then called the webservice.
Funny thing is that with the same code if I write a stand alone client with public static void main() it is able to call the webservice properly . But if I write the same code and package it in .war file and deploy in WLS 9.2 it is giving the above mentioned error. Another thing even though I set "javax.net.ssl.trustStore" with the absolute path of server.keystore file,while I print the values in jvm, it never shows up. but all other values are properly shown. is this the problem of local and weblogic JVMs ? Could any one help . please ... it is urgent !! [ November 01, 2008: Message edited by: Bear Bibeault ]
Joined: Sep 18, 2008
I think Weblogic configuration was overriding whatever written in the code. Thats why I added the following Extra code which seems working.......