Hi all,

     I finally made the most basic SSL code run in my computer. Now I am
trying to send Post requests with the HttpClient class. I get the
following exception when I do the Execute method:

java.net.SocketException: Socket closed
        at java.net.PlainSocketImpl.socketGetOption(Native Method)
        at java.net.PlainSocketImpl.getOption(PlainSocketImpl.java:198)
        at java.net.Socket.getSendBufferSize(Socket.java:526)
        at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:70
3)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:6
25)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:5
00)
        at com.SSLPayment.sendPayment(SSLPayment.java:104)
        at com.SSLPayment.main(SSLPayment.java:143)

My code is pretty straight forward, I create my PostMethod and add all
the parameters I need to send (just 20 pairs of values) and after that
execute this code:

        
System.setProperty("java.protocol.handler.pkgs","com.ibm.net.ssl.interna
l.www.protocol");
                java.security.Security.addProvider(new
com.ibm.jsse.JSSEProvider());
                
                status = hc.executeMethod( pm );


Does any body have an Idea why I am getting this error and can give me a
hand to solve it. 

Thanks,


Claudio.

-----Original Message-----
From: Michael Becke [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 02, 2003 9:57 PM
To: Commons HttpClient Project
Subject: Re: WSAD & HTTPClient question

Sorry Claudio, I'm not sure.  This appears to be a configuration 
problem with WebSphere.  I would suggest looking at IBM's support site 
or WebSphere newsgroups for more information.  If you have a HttpClient 
specific question we will probably be of more help.

Mike

On Wednesday, July 2, 2003, at 11:57 AM, Claudio Santana wrote:

>
>       Thanks to all that answered my help request, I am trying to run
> with IBM's WSAD 4.0.3, It comes with JDK 1.3. I am not trying to use
> specifically any special implementation of JCE or JSSE, it can be
IBM's
> or SUN's. As you explain in your email it comes with IBM's
> implementation of JCE and JSSE. I already added that System Property
> java.protocol.handler.pkgs=com.ibm.net.ssl.internal.www.protocol in
the
> environment in my WebSphere Test Environment but it makes no 
> difference.
> Any other idea?
>
> Claudio.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 02, 2003 7:49 AM
> To: Commons HttpClient Project
> Subject: Re: WSAD & HTTPClient question
>
> Laura is right, WSAD comes with the IBMJCE and IBMJSSE, which is only
a
> problem if you absolutely require Sun's JSSE, or are using a signed
> third
> party JCE provider.  If you do not require either of these, then all 
> you
>
> need to do is make sure the java.protocol.handler.pkgs system property
> is
> pointing at: com.ibm.net.ssl.internal.www.protocol.  And if you have
> been
> specifying a specific provider, stop doing that.
>
> If you do require Sun, then things get a little tricky.  You will need
> to
> remove the following jars from your server's vm... another point -
WSAD
> uses at least two vm's... the one that matters when debugging/running 
> is
>
> the server vm... if I remember correctly it is under
plugins.server.jdk
> (something like that).
>
> Ok, the jars:
> ibmjcefw.jar
> ibmjceprovider.jar
> ibmjsse.jar
>
> The above jars need to be replaced with the Sun JCE and JSSE jars (all
> of
> the jars from both packages).
>
> Then, you need to modify the java.security file, removing all of the 
> IBM
>
> JCE/JSSE related provider lines, and replacing them with the Sun
> JCE/JSSE
> provider lines provided in the installation documents of both of the 
> JCE
>
> and JSSE packages.
>
> Hope this helps.
>
> - Matt
>
>
>
>
>
> Laura Werner <[EMAIL PROTECTED]>
> 07/01/2003 05:57 PM
> Please respond to "Commons HttpClient Project"
>
>
>         To:     Commons HttpClient Project
> <[EMAIL PROTECTED]>
>         cc:
>         Subject:        Re: WSAD & HTTPClient question
>
>
> Hi Claudio,
>
>> Does any one know any special consideration I have
>> to know in order to make this work under WSAD 4.03?
>
> If WSAD uses an IBM version of the JDK, which I think it does, you
> probably need to get the corresponding IBM version of JSSE.  We once 
> ran
>
> into a problem trying to use the Sun JSSE jars with an IBM JDK (1.3,
if
> I
> remember right).
>
> -- Laura
>
>
>
>
> ---------------------------------------------------------------------
> 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]
>


---------------------------------------------------------------------
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]

Reply via email to