hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Ensuring Data Integrity with POST
Date Tue, 13 Sep 2005 15:22:00 GMT
On Tue, Sep 13, 2005 at 11:01:24AM -0400, Chris Ashurst wrote:
> In my continuing saga of making HttpClient talk to an ISS5 server 
> through SSL and Basic authentication, I have come across an interesting 
> bit of information.
> Reading through the archives, I noticed a post for a piece of software 
> called Ethereal for packet logging. I installed it and logged the IO and 
> received a nasty surprise. I seem to be getting an error along the lines 
> of [Unreassembled Packet [Incorrect TCP checksum]], which I'm guessing 
> (since Ethereal doesn't seem to want to decode the packet into something 
> human-readable) is my SOAP envelope somehow being malformed during the 
> transport process.


I seriously doubt HttpClient can cause IP packet corruption. HTTP sits
on top of TCP/IP and simply does not have means to manipulate lower
level structures.

> What I would like to know is if there's a way to see *specfically* how 
> HttpClient is sending my RequestEntity, and if it is in fact sending the 
> correct content-length and so on.

Enable content + header wire logging. For details see the HttpClient
logging guide:


Hope this helps


> I know now that the SOAP package I'm trying to send is valid, as I sent 
> it to the people running the remote server and it processes fine, so the 
> only place I can see now where the problem is lying would be that 
> HttpClient is malforming the package.
> I'm using the following to send the SOAP/XML file:
> ~~~
> File input = new File("testCreate.xml");
> client.getParams().setAuthenticationPreemptive(true); 
> client.getParams().setVersion(HttpVersion.HTTP_1_1);
> client.getParams().setBooleanParameter("http.protocol.expect-continue", 
> true);
> post.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
> post.setRequestHeader("SOAPAction","http://remote.server.com/ProcessXml");
> post.setRequestEntity(new InputStreamRequestEntity(new 
> FileInputStream(input), input.length()));
> int status = client.executeMethod(post);
> ~~~
> In the debug/wire log, all it tells me is that "EntityEnclosingMethod - 
> Request body sent", and I know that if I just tried to output the 
> contents of the file, it wouldn't be the same as what was being 
> transported to the remote server.
> (Alternatively, if someone can tell me if there's a way to decode the 
> output from Ethereal, that would work just as well. I know this isn't 
> the Ethereal support list, but I figure someone must know ;) )
> Many thanks,
> ~Chris
> -- 
> ~Chris Ashurst
> ~~Tower Hill Insurance
> ~cashurst@thig.com
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

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

View raw message