Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using HTTPS from a remote java client

4 views
Skip to first unread message

Eugene Gluzberg

unread,
Sep 5, 2001, 2:39:46 PM9/5/01
to
Hi, I have a java client using EJBs from weblogic using a regular t3
connection.

I am trying to use this same servlet to make an outgoing SSL connection to a
tomcat servlet engine. The SSL connection fails with the following
exception:

java.net.ConnectException: Tried all: 1 addresses, but could not connect
over HTTPS to server: saki port: 8433
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:54)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:156)
at weblogic.net.http.HttpClient.<init>(HttpClient.java:85)
at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:34)
at weblogic.net.http.HttpClient.New(HttpClient.java:119)
at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:99)
at
weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1
46)
at
com.realpulse.common.transport.HTTPOutputTransport.writeMessage(HTTPOutputTr
ansport.java:41)
at
com.realpulse.gs.transport.OutboundDeliveryThread.deliverMessage(OutboundDel
iveryThread.java:70)

When I try the same connection with a java client that does not use
weblogic, it works fine.

Question:

Why does my https connection using weblogic's classes, I want to use the
regular sun classes, and I am setting all the properties correctly:

System.setProperty("java.handler.protocol.pkgs",
"com.sun.net.ssl.internal.www.protocol");
System.setProperty("javax.net.ssl.trustStore", "/etc/keystore");
Provider sslP = new com.sun.net.ssl.internal.ssl.Provider();
Security.removeProvider( sslP.getName() );
Security.insertProviderAt( sslP, 1 );
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setDoOutput(true);
con.setDoInput(true);
con.setUseCaches (false);
con.setRequestProperty("Content-Type", "application/octet-stream");
OutputStream out = con.getOutputStream();


0 new messages