Re: Httpclient under weblogic 7.0

2003-05-29 Thread Michael Becke
Om,

I'm wondering if the java.net.ssl.SSLSocketFactory is being configured 
correctly.  I notice that you are using 
weblogic.net.http.HttpsURLConnection.  Does your example also work if 
you do url.openConnection()?  If not, then the Weblogic 
SSLSocketFactory is not registered correctly.  By default, when opening 
SSL connections, HttpClient calls SSLSocketFactory.getDefault() to 
obtain a socket factory for creating SSL sockets.  If this does not 
return a usable SocketFactory then things will not work.  Assuming that 
SSLSocketFactory is not correctly configured you have two options:

1) Register the Weblogic SocketFactory with the SSLSocketFactory.  This 
can probably be done by setting some system properties or registering a 
provider with Security.addProvider().  You will probably have to look 
into Sun's docs a little.
2) Create a custom HttpClient ProtocolSocketFactory.  Take a look at 
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory for how 
to implement this.  This socket factory must then must be registered 
with Protocol.registerProtocol().

Good luck.

Mike

On Tuesday, May 27, 2003, at 08:12 PM, Om Narayan wrote:

I am trying to use httpclient with weblogic 7.0.
It works fine without SSL, but when I try to use https urls it just 
sits there hanging. If I use weblogic's apis, the program works fine 
(btw, I am using the sslclient example that comes with weblogic).
I am using weblogic's implementation of SSL (not Sun's JSSE). Is there 
any special setup/installation necessary?

Om.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Httpclient under weblogic 7.0

2003-05-28 Thread Ortwin Glück
Adrian Sutton wrote:
I'd also point you to the HTTPS guide but Oleg hasn't written it yet 
grin.


There still is the (short) one httpclient/docs/USING_HTTPS.txt
Browse it online here:
http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/docs/USING_HTTPS.txt?rev=1.4content-type=text/vnd.viewcvs-markup
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Httpclient under weblogic 7.0

2003-05-28 Thread Kalnichevski, Oleg
Om,

I strongly recommend to upgrade to beta-1 release (currently available through CVS 
only) or the latest nightly build. As far as I can see from the trace log you are 
still running an old version (most probably 2.0a3)

I'll be working on an SSL guide this weekend. So, stay tuned

Oleg

-Original Message-
From: Ortwin Glück [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 28, 2003 08:49
To: Commons HttpClient Project
Subject: Re: Httpclient under weblogic 7.0


Adrian Sutton wrote:
 I'd also point you to the HTTPS guide but Oleg hasn't written it yet 
 grin.


There still is the (short) one httpclient/docs/USING_HTTPS.txt
Browse it online here:
http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/docs/USING_HTTPS.txt?rev=1.4content-type=text/vnd.viewcvs-markup


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Httpclient under weblogic 7.0

2003-05-27 Thread Om Narayan
] at
examples.security.sslclient.SSLClientTest.main(SSLClientTest.
java:50)


Thanks.

Om.


- Original Message -
From: Adrian Sutton [EMAIL PROTECTED]
To: Commons HttpClient Project [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 5:20 PM
Subject: Re: Httpclient under weblogic 7.0


 Maybe someone will know a particular gotcha with weblogic, but the best
 chance for finding the source of the problem always lies in the debug
 logs (regular members of the list should know the following mantra by
 now):  :)

 Could you please supply a wire trace log showing an attempt to use SSL
 with your application.  Instructions can be found at
 http://jakarta.apache.org/commons/httpclient/logging.html  There are
 some other useful troubleshooting hints in the trouble shooting guide
 at http://jakarta.apache.org/commons/httpclient/troubleshooting.html
 Finally, a simple test case is always useful, I think I can get my
 hands on a copy of weblogic so if it has to use weblogic that might be
 okay, try reproducing the problem outside of weblogic if you can though.

 I'd also point you to the HTTPS guide but Oleg hasn't written it yet
 grin.

 Once we get some debugging information we should be able to work out
 what the problem is and help you fix it.

 Regards,

 Adrian Sutton.

 On Wednesday, May 28, 2003, at 10:12  AM, Om Narayan wrote:

  I am trying to use httpclient with weblogic 7.0.
  It works fine without SSL, but when I try to use https urls it just
  sits there hanging. If I use weblogic's apis, the program works fine
  (btw, I am using the sslclient example that comes with weblogic).
  I am using weblogic's implementation of SSL (not Sun's JSSE). Is there
  any special setup/installation necessary?
 
  Om.


 -
 To unsubscribe, e-mail:
[EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Httpclient under weblogic 7.0

2003-05-27 Thread Vamsi Atluri
Hi Om,

I recently had to use HttpClient to make some SSL connections from with in
a session bean deployed in WebLogic 7.0. I had a problem where the SSL
handshake never goes through. I am using JSSE for SSL though. I did the
following steps to get it working:

1) moved the JDK to 1.4.1
2) added jsse.jar, httpclient.jar, jnet.jar and jcert.jar to the
POST_CLASSPATH in startWebLogic.cmd (so that they will be tacked on to
CLASSPATH)
2) added the certificate of the host i am connecting to (xxx.cer) cacerts
in the JDK and also the cacerts under \bea\weblogic700\server\lib\.
2.1) the way to do this is keytool -import -keystore path to
cacerts -file path to xxx.cer
2.2) the default password for the keystore is changeit :-)
3) add the following argument to the weblogic.Server command:
-Dweblogic.security.SSL.trustedCAKeyStore=cpath to cacerts

Hope this helps.

-Vamsi

--- Om Narayan [EMAIL PROTECTED] wrote:
 I am trying to use httpclient with weblogic 7.0.
 It works fine without SSL, but when I try to use https urls it just sits
 there hanging. If I use weblogic's apis, the program works fine (btw, I
 am using the sslclient example that comes with weblogic).
 I am using weblogic's implementation of SSL (not Sun's JSSE). Is there
 any special setup/installation necessary?
 
 Om.
 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]