File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes Urgent! (Very IMP) Implementing client on SSL in webservices!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Urgent! (Very IMP) Implementing client on SSL in webservices!!!" Watch "Urgent! (Very IMP) Implementing client on SSL in webservices!!!" New topic

Urgent! (Very IMP) Implementing client on SSL in webservices!!!

Vamsi Jaya prasad

Joined: Oct 28, 2002
Posts: 4
I am working on webservices. I am working on mutual atentication using SSL. I configured the SSL at server side. And i have written the below code in the client side to configure it for SSL. The code is.....
public static void main(String[] argv) throws Exception
// Setup the global JAXM message factory
System.setProperty("javax.xml.soap.MessageFactory", "weblogic.webservice.core.soap.MessageFactoryImpl");
// Setup the global JAX-RPC service factory
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();
HelloWorldEJB_Impl ws = new HelloWorldEJB_Impl(wsdlURL);
HelloWorldEJBPort port = ws.getHelloWorldEJBPort("weblogic","weblogic");
String returnVal = port.sayHello("MY STRING");
But it is giving below exception Write Channel Closed, possible SSL handshaking or trust failure at com.certicom.tls.record.WriteHandler.write(Unknown Source)at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknown Source)at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(UnknownSource)at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(UnknownSource)at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source)at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)at com.certicom.tls.record.ReadHandler.interpretContent(Unknown Source)at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)at com.certicom.tls.record.WriteHandler.write(Unknown Source)at Source)at Source)at weblogic.webservice.client.https.HttpsURLConnection.getInputStream(<init>( weblogic.webservice.WebServiceFactory.createFromWSDL( weblogic.webservice.WebServiceFactory.createFromWSDL( weblogic.webservice.core.rpc.ServiceImpl.<init>( examples.webservices.basic.statelessSession.HelloWorldEJB_Impl.<init> at examples.webservices.basic.statelessSession.Client.main( in thread "main" Failed to retrieve WSDL from https://localhost:7002/basic_statelessSession/HelloWorldEJB?WSDL. Please check the URL and make sure that it is a valid XML file [ Write Channel Closed, possible SSL handshaking or trust failu
Can any body know about please let me know what is the wrong with the above code.
jQuery in Action, 2nd edition
subject: Urgent! (Very IMP) Implementing client on SSL in webservices!!!
Similar Threads
Exception calling web service over SSL since upgrade to SP4
Weblogic 7.0 SSL Client
Invoking an https web service
Weblogic web service Secuiry
Client Authentication for a web services