I need to communicate with HTTP port 3642 for a given session. Here's the code I'm using to create my client:

       //create a singular HttpClient object
       Client = new HttpClient();

       //establish a connection within 5 seconds
       Client.getHttpConnectionManager().
           getParams().setConnectionTimeout(TIMEOUT);
       Client.getHostConfiguration().setHost(Host, Port, "http");
       HttpClientParams parms=Client.getParams();
parms.setBooleanParameter(HttpMethodParams.SINGLE_COOKIE_HEADER, true);
       parms.setCookiePolicy(CookiePolicy.RFC_2109);

Now I create my get and send it...

   public InputStream get(String url, NameValuePair[] parms)
       throws heavyweight.Exception
   {
       GetMethod method = new GetMethod(url);

       method.setQueryString(parms);

       //execute the method
       InputStream responseBody = null;
       Client.executeMethod(method);
       responseBody = method.getResponseBodyAsStream();

The problem is that when I do this, it appears to be opening port 80. Here's a portion of the log:

2005/09/10 08:24:18:542 EDT [DEBUG] DefaultHttpParams - Set parameter http.connection.timeout = 5000 2005/09/10 08:24:18:592 EDT [DEBUG] DefaultHttpParams - Set parameter http.protocol.single-cookie-header = true 2005/09/10 08:24:18:592 EDT [DEBUG] DefaultHttpParams - Set parameter http.protocol.cookie-policy = rfc2109 865 [main] DEBUG heavyweight.io.CgiProcessor - http://orgmeta.xmlsweb.com/xmlsos/xml/v5/login.asp 865 [main] DEBUG heavyweight.io.CgiProcessor - http://orgmeta.xmlsweb.com/xmlsos/xml/v5/login.asp 866 [main] DEBUG heavyweight.io.CgiProcessor - http://orgmeta.xmlsweb.com/http://orgmeta.xmlsweb.com/xmlsos/xml/v5/login.asp 866 [main] DEBUG heavyweight.io.CgiProcessor - http://orgmeta.xmlsweb.com/http://orgmeta.xmlsweb.com/xmlsos/xml/v5/login.asp *2005/09/10 08:24:18:870 EDT [DEBUG] HttpConnection - Open connection to orgmeta.xmlsweb.com:80* 2005/09/10 08:24:23:343 EDT [DEBUG] header - >> "GET /http://orgmeta.xmlsweb.com/xmlsos/xml/v5/login.asp?org_id=nors&userid=AGT4&password=pics44&app=xmlsphoto HTTP/1.1[\r][\n]"

It is trying to connect on port 80 anyway and I haven't found any way to tell it to use a specifc port on an HttpMethod. Can someone give me some guidance on this, please?

Thanks.

--
"In every revolution, there is one man with a vision."--Jerome Bixby

Thom Hehl
<A href="www.heavyweightsoftware.com"> www.heavyweightsoftware.com</A>


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

Reply via email to