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

Using SSL from EJB to non-WLS web server

0 views
Skip to first unread message

Joe Rider

unread,
Jul 26, 2001, 8:47:17 PM7/26/01
to
I have a need for an EJB that I am writing (for WLS 6.0) to communicate with
another web server via SSL. The other web server requires that I pass a Client
Certificate to authenticate myself. The remote web server is NOT a WebLogic
server. I see no references in the Bea documentation to how to achieve this.

I have tried to create a new URL with "https://...". I call openConnection() on
the URL instance, and my EJB gets back an instance of
weblogic.net.http.HttpsURLConnection. This class doesn't appear to be
documented. Does anybody have any ideas how I can use this class to pass my
Client key and Cert chain?

When I tried to use the URLConnection class returned, it threw an exception when
I tried to open a stream. The stack trace shows lots of classes that lead me to
believe that support exists for this functionality. Here is a snippet from the
stack dump:

java.net.SocketException: Connection aborted by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:72)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:130)
at weblogic.security.SSL.SSLSocket.sendRecord(SSLSocket.java:964)
at
weblogic.security.SSL.SSLSocket.sendChangeCipherSpec(SSLSocket.java:926)
at weblogic.security.SSL.SSLSocket.clientInit(SSLSocket.java:477)
at weblogic.security.SSL.SSLSocket.initialize(SSLSocket.java:245)
at weblogic.security.SSL.SSLSocket.<init>(SSLSocket.java:194)
at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:45)
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:146)

The only documentation I have found is under the 5.1 docs, referencing how you
can use the JNDI Environment to establish a connection to a remote WLS JNDI
tree. If URLs are a resource that can be pooled by WLS, I would like to take
advantage of that functionality. Otherwise, I will have to fall back to the
primitives and roll my own SSLSocket classes. I would expect that there is
support buried somewhere in the product, it is just a question of figuring out
how to use it.

Thanks for any and all suggestions!
Joe

Paul Ferwerda

unread,
Jul 27, 2001, 11:41:16 AM7/27/01
to
Joe,
Apparently weblogic.net.http.HttpsURLConnection isn't documented although 6.0SP2 has a new example called examples/security/sslclient that shows how to use it.

Paul

Joe Rider

unread,
Jul 27, 2001, 1:52:56 PM7/27/01
to
Could you either post that example, or where I could find it? My install of SP2
has:

bea\
wlserver6.0\
samples\
examples\
security\
acl\
audit\
cert\
jaas\
net\
proxy\
rdbmsreal\

No sslclient directory in my examples.

Thanks,
Joe

On Fri, 27 Jul 2001 15:41:16 GMT, Paul Ferwerda <pa...@reply-in-newsgroups.com>
wrote:

Paul Ferwerda

unread,
Jul 27, 2001, 3:26:07 PM7/27/01
to
You're right. I saw it in the 6.1 beta and had thought that I saw it in 6.0sp2.

Paul

0 new messages