Java Reference
In-Depth Information
<middleInitial>J</middleInitial>
<lastName>Fogg</lastName>
</name>
<expirationDate>2015-04-27-07:00</expirationDate>
</creditCard>
</S:Body></S:Envelope>--------------------
---[HTTP response 200]---
Transfer-encoding: chunked
null: HTTP/1.1 200 OK
Content-type: text/xml;charset="utf-8"
Server: Sun Java System Application Server 9.1_01
X-powered-by: Servlet/2.5
Date: Sun, 27 Apr 2008 21:40:44 GMT
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<authorization xmlns="http://ns.soacookbook.com/credit">
<amount>2500.0</amount>
</authorization>
</S:Body></S:Envelope>--------------------
There is a corresponding class available on the server side that lets you dump messages for
incoming traffic to the console.
NOTE
If you are invoking your web services through a web page, it is also convenient to use the Firefox
plug-in called Live HTTP Headers, which shows the HTTP headers for every request and response
in a window. You can get it at https://addons.mozilla.org/en-US/firefox/addon/3829 .
Discussion
The disadvantage to using monitoring GUI tools, other than the fact that you need a GUI en-
vironment to run them, is that they use a man-in-the-middle strategy that requires rerouting
the destination of your messages. Here's how they work: the monitor receives your request,
dumps the payload, and then forwards your request to its intended destination. So, you are
forced to change your service client to point to the port on which the monitor listens. Setting
HttpTransportPipe.dump=true allows you to see the content of your messages with less
error-prone twiddling. It can be easier, quicker, and cleaner to set up a console dumper like
this as you are getting started.
Search WWH ::




Custom Search