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.
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.
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
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]