Java Reference
In-Depth Information
http://localhost:8080/wse/
join.html?firstname=Ryan&lastname=Cuprak&container=seller
The URL has the following structure:
<scheme>:<port>/<resource id>
So in this case the scheme, port, and resource ID are
• Scheme: http
• Port: 8080
• Resource ID: /wse/
join.html?firstname=Ryan&lastname=Cuprak&container
=seller
Everything needed to service your request is included with the request. If you sniff the con-
nection between the browser and the server, you'll see slightly more data being exchanged
that's hidden. This information is put together and sent to the server to help the server pro-
cess the request. The server will thus know whether the client is an iPhone handset, mobile
browser, or full browser and can then respond with the appropriate content. The raw con-
tent on the wire is as follows:
GET /wse/join.html?firstname=Ryan&lastname=Cuprak&container=seller HTTP/1.1
Host: localhost:8090
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/
534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: http://localhost:8090/wse/join.html
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Cookie: __utma=111872281.1889907053.1320526418.1320526418.1320526418.1;
treeForm_tree-hi=treeForm:tree:configurations:default-config:loggerSetting;
JSESSIONID=ba0e0c6c96fa10944cbf7d69309d
Connection: keep-alive
Debugging web service invocations
When working with web services, it's often necessary to debug the messages being ex-
changed. Tools such as tcpmon ( http://ws.apache.org/commons/tcpmon/ ) enable you to
capture both the request and the response. Using this tool you can see exactly what is being
requested and the content of the response. You might discover that a proxy server is inter-
Search WWH ::




Custom Search