• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing POST message

 
Tom Griffith
Ranch Hand
Posts: 275
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. If somebody has a minute, is there a way to print the contents of a POST message to the console, ie....

POST /EndorsementSearch HTTP/1.1
Host: www.snowboard-info.com
Content-Type: text/xml; charset="utf-8"
Content-Length: 261
SOAPAction: "http://www.snowboard-info.com/EndorsementSearch"
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:GetEndorsingBoarder xmlns:m="http://namespaces.snowboard-info.com">
<manufacturer>K2</manufacturer>
<model>Fatbob</model>
</m:GetEndorsingBoarder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I can obviously print the httpresponse using a bufferedreader and setting up an InputStream on the response...but not sure about outbound POST messages. Thank you very much for reading this.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if the Apache Commons HTTPClient package has anything to help. They have an HttpURLConnection replacement that may be a bit more open. I tried to write one once using a raw socket inside so I could do some weird stuff, and realized it would involve implementing a major chunk of the HTTP protocol. I found another way to meet my requirements. You might, too. Have you tried an HTTP sniffer like HttpLook? Or maybe a proxy? (I know zip about proxies, but they seem to live in the right place to print out everything that goes through.)
[ July 31, 2006: Message edited by: Stan James ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic