hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Randall" <crand...@tradermade.com>
Subject Http Client and Proxy Firewall Connection
Date Thu, 02 Dec 2004 09:04:53 GMT
 
I am using HTTP Client to establish a connection to a servlet, I then
open a
Input stream to listen for data. 
 
When running this on a machine with a simple proxy and firewall it works
great, I 
can stream real time rates to the client. When I run this through one of
our clients 
networks I get the connection established on the server but no data gets
returned. 
When the server sends the data everything looks ok I don't get any
errors.
 
I was not sure if this could be a packet filtering issue?
 
The Client Code:
                                    HttpClient client = new
HttpClient(new MultiThreadedHttpConnectionManager());
 
client.getHostConfiguration().setProxy(proxyHost, proxyPort);
                                    NTCredentials ntCreds = new
NTCredentials( proxyUsername, proxyPassword, computerName, domainName);
 
client.getState().setProxyCredentials(null, proxyHost, ntCreds);
                                    PostMethod post = new
PostMethod(address);
                                    post.setParameter("REQ_TYPE",
"REG_CONN");
                                    post.setParameter("USERNAME",
username);
                                    client.executeMethod(post);
                                    dataIn = new
DataInputStream(post.getResponseBodyAsStream());
 
                                    while(true){
                                                dataIn.readUTF();
                                    }
 
 
Many Thanks 
 
Chris
 

This message is confidential and for use by the addressee only.
If you are not the correct addressee, then kindly return the message to the sender and delete
it from your computer.
Internet communications are not secure and TraderMade accepts no responsibility for changes
made to this message after it was sent.


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