Wednesday Sep 06, 2006

wsmonitor 1.1 and Fast Infoset

As mentioned in The Aquarium few weeks ago, Fast Infoset support is now available in wsmonitor. Thanks to Joe Wang for all the work.

Given below is the CVS diff of JAX-WS fromjava sample that shows how to run the sample using wsmonitor and also how Fast Infoset support can be enabled.

cvs server: Diffing .
Index: build.xml
===================================================================
RCS file: /cvs/jax-ws-sources/jaxws-ri/samples/annotations/build.xml,v
retrieving revision 1.5.2.2.2.1
diff -r1.5.2.2.2.1 build.xml
125a126,127
> <sysproperty key="wsmonitor" value="${wsmonitor}"/>
> <sysproperty key="com.sun.xml.ws.client.ContentNegotiation" value="${fi}"/>
cvs server: Diffing etc
Index: etc/build.properties
===================================================================
RCS file: /cvs/jax-ws-sources/jaxws-ri/samples/annotations/etc/build.properties,v
retrieving revision 1.5
diff -r1.5 build.properties
9a10,11
> wsmonitor=false
> fi=none
cvs server: Diffing src
cvs server: Diffing src/annotations
cvs server: Diffing src/annotations/client
Index: src/annotations/client/AddNumbersClient.java
===================================================================
RCS file: /cvs/jax-ws-sources/jaxws-ri/samples/annotations/src/annotations/client/AddNumbersClient.java,v
retrieving revision 1.5.12.1
diff -r1.5.12.1 AddNumbersClient.java
23a24,25
> import javax.xml.ws.BindingProvider;
>
27a30
> log(port);
42a46,53
> }
> }
>
> private static final void log(AddNumbers port) {
> if (Boolean.getBoolean("wsmonitor";)) {
> String address = (String)((BindingProvider)port).getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
> address = address.replaceFirst("8080", "4040";);
> ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
cvs server: Diffing src/annotations/server

This sample is available in JAX-WS 2.0.1 binary or can be checked out along with the JAX-WS sources project.

After making the above mentioned changes in the files, download, install and run wsmonitor v1.1. Re-build the sample client (ant client) and run it with the following additional properties: 

ant run -Dwsmonitor=true

This command will run the client and wsmonitor console will show the HTTP headers and SOAP request and response messages.

ant run -Dfi=[optimistic | pessimistic | none ]

This command will run the client based upon the Fast Infoset content negotiation defined by the property values. The wsmonitor console will show the HTTP headers and SOAP request and response messages. Fast Infoset messages are identified by the request and response encoding shown in the table at the top and also by the application/fastinfoset value of Accept-Type HTTP header for the request message and Content-Type HTTP header for the response message. The SOAP message, in this case, is displayed as a binary dump using hexadecimal representation.

The various console dumps showing HTTP headers and request/response messages using SOAP and Fast Infoset is available here.

Technorati: Web-services JAX-WS SOAP HTTP Fast Infoset

Thursday Aug 10, 2006

wsmonitor (Web Services Monitor): A light-weight SOAP and HTTP Traffic Monitoring tool

This tool, wsmonitor, is a light-weight, easy to use SOAP and HTTP traffic monitoring tool. This tool uses port forwarding to capture the SOAP messages and HTTP headers between a sender and a receiver and displays them nicely formatted in a graphical user interface. The key features are:

  • Easy to use
  • Light weight
  • Displays XML- formatted SOAP message
  • Separate tabs for SOAP and HTTP traffic
  • Transport-level data capture

The tool is available for free download at wsmonitor.dev.java.net.

Download, use and send comments to users-AT-wsmonitor.dev.java.net.

Technorati: Web-services JAX-WS SOAP HTTP

About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today