Problem executing web service client using HTTPS
Hi !
I am programing a web service client that uses HTTPS.
I use the SUN One Appserver7.
I work with the example SUNWappserver7/samples/webservices/jaxrpc/simple
I configure the port 555 for using HTTPS.
The code that I use is:
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider() );
System.setProperty("javax.net.ssl.keyStore"
,"/usr/j2se/jre/lib/security/cacerts");
System.setProperty("javax.net.ssl.keyStoreType"
,"pkcs12");
/*,"KeyStore.getDefaultType()"); */
System.setProperty("javax.net.ssl.keyStorePassword"
,"changeit");
System.setProperty("javax.net.ssl.trustStore"
, "/usr/j2se/jre/lib/security/cacerts");
System.setProperty("javax.net.ssl.trustStoreType"
,"KeyStore.getDefaultType()");
System.setProperty("javax.net.ssl.trustStorePassword"
, "changeit");
System.setProperty("java.protocol.handler.pkgs"
,"com.sun.net.ssl.internal.www.protocol");
Stub stub = createProxy();
HelloIF hello = (HelloIF)stub;
System.out.println(hello.sayHello("Duke!"));
With this configuration the error displayed is:
java.rmi.RemoteException: HTTP transport error: java.net.SocketException: Default SSL context init failed: DerInputStream.getLength(): lengthTag=109, too big.; nested exception is:
HTTP transport error: java.net.SocketException: Default SSL context init failed: DerInputStream.getLength(): lengthTag=109, too big.
at samples.webservices.jaxrpc.simple.HelloIF_Stub.sayHello(HelloIF_Stub.java:77)
at samples.webservices.jaxrpc.simple.HelloClient.main(Unknown Source)
Caused by: HTTP transport error: java.net.SocketException: Default SSL context init failed: DerInputStream.getLength(): lengthTag=109, too big.
at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTransport.java:140)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:92)at samples.webservices.jaxrpc.simple.HelloIF_Stub.sayHello(HelloIF_Stub.java:60)
... 1 more
Does anybody have an idea what is happening here ?
In advance, thanks.
Ricardo

