hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip_...@avivacanada.com
Subject Re: Compatible issue solution of HttpClient and IBM WSAD environment
Date Fri, 26 Oct 2007 15:46:17 GMT
Ortwin,

I agree. Since the original code is not straight forward. I followed the 
same coding approach. Below is the procedure. It would be much easy to 
read.

The original one is:

        //  SocketFactory socketFactory = 
Class.forName(socketfactoryName).getDefault();
        //  Socket socket = socketFactory.createSocket();
        //  SocketAddress localaddr = new InetSocketAddress(localAddress, 
localPort);
        //  SocketAddress remoteaddr = new InetSocketAddress(host, port);
        //  socket.bind(localaddr);
        //  socket.connect(remoteaddr, timeout);
        //  return socket;

I changed to:

        //  SocketFactory socketFactory = 
Class.forName(socketfactoryName).getDefault();
          //  localaddr = InetAddress.getByName("localhost");
        //  SocketAddress remoteaddr = new InetSocketAddress(host, port);
        //  Socket socket = socketFactory.createSocket(remoteaddr, new 
Integer(port),localAddress, new Integer(localPort));
        //  socket.connect(remoteaddr, timeout);
        //  return socket;


Best Regards,

Philip She

Web Services and Infrastructure Software -BSD
Aviva Canada Inc.,
2206 Eglinton Avenue East, Scarborough, On. M1L 4S8
Tel: 416-2882667




Ortwin Gl├╝ck <odi@odi.ch> 
10/26/2007 11:30 AM
Please respond to
"HttpComponents Project" <httpcomponents-dev@jakarta.apache.org>


To
HttpComponents Project <httpcomponents-dev@jakarta.apache.org>
cc

Subject
Re: Compatible issue solution of HttpClient and IBM WSAD environment








Philip_She@avivacanada.com wrote:
> I am developing an application using HttpClient to access a HTTPS web 
> application server in WSAD 5.1.2. But it failed because of IBM jsse does 

> not support httpclient. I tried to replace the IBM jsse using SUN's 
Jsse. 
> It seems not a good idea. I debugged this and find the reason. I made 
some 
> change and it works fine.
> 
> The problem is in class com.avivacanada.commons.httpclient.protocol.
> ReflectionSocketFactory

Wow, that is a little hard to read. Am I seeing this right, that you are
basically specifying the local address and port? Just out of curiosity, 
what
kind of error message do you get with the existing code?

Ortwin

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: 
httpcomponents-dev-help@jakarta.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message