wsmonitor 1.1 and Fast Infoset

Guest Author
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
diff -r1. build.xml
> <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
> 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
diff -r1.5.12.1 AddNumbersClient.java
> import javax.xml.ws.BindingProvider;
> log(port);
> }
> }
> 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

After making the above mentioned changes in the files, download, install and
run wsmonitor
. 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.

Web-servicesJAX-WS SOAP

Join the discussion

Comments ( 1 )
  • gerrge Tuesday, September 12, 2006
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.