https://wsmonitor.dev.java.net/

wsmonitor

Web services Message Monitoring Tool

__


Meet Wsmonitor

Find out what is Wsmonitor and get started.</p>


Use Wsmonitor

See how to get more out of Wsmonitor.</p>


Extend Wsmonitor

Learn how to build Wsmonitor or extend Wsmonitor by writing plugins.

</p>

Stable Release

  1. Download the distribution (download the latest version).
  2. JDK 1.5.0 or later is required. Install by giving the following command:
    java -jar wsmonitor-installer-XX.jar
    where XX is the version number of the tool. This will present a dialog box asking you to accept the license. Once accepted, it will extract the tool in “wsmonitor” directory in your current directory. All scripts are in wsmonitor/bin directory and can be invoked from any directory.
  3. Invoke the tool by giving the following command:
    wsmonitor/bin/wsmonitor.[bat | sh]
    This start the tool listening at localhost:4040 and forwarding to localhost:8080.
  4. To invoke with a config file specifying non-default port forwards, use the following command:
    wsmonitor/bin/wsmonitor.[bat | sh] config.xml
  5. To invoke the tool in verbose, use the following command:
    wsmonitor/bin/wsmonitor.[bat | sh] -verbose

 

Overview

wsmonitor (Web Services Monitor) is a light-weight SOAP and HTTP traffic monitor. This tool intercepts and logs the SOAP messages and HTTP headers between a sender and a receiver and displays them nicely formatted in a graphical user interface.

##

How does it work ?

The tool uses port-forwarding to capture the traffic. In simple language, when the tool is started it listens on listenPort port on localhost and brings up a display window. A sender originally sending request to http://targetHost:targetPort/somepath now sends the request to http://localhost:listenPort/somepath. The wsmonitor then forwards the request received at localhost:listenPort to targetHost:targetPort., without any alteration of the message. In between, it captures all the inbound and outbound SOAP and HTTP traffic and displays in a nicely formatted way in the wsmonitor window.

The wsmonitor listen port, target host and target port are specified in an XML-based configuration file. In the absence of this configuration file, a default value of “4040” for listen port, “localhost” for target host, “8080” for target port is assumed. A sample config file, along with it’s schema, is available in the etc directory. Each port forward opens up as a new tab on the wsmonitor display window.

The name “wsmonitor” is aligned with wsimport and wsgen tools available in JAX-WS. Even though the name is aligned with JAX-WS tools, this tool can be used with any Web services stack.</p>

Key Features

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

 

 

How can I use it ?

The wsmonitor workspace is undergoing extreme makeover. You can try the bleeding edge build or stable release.  Bugs will only be fixed in the bleeding edge build. So before filing an issue, please try it with the bleeding edge build.
Let’s get started!

  1. Download and Start Wsmonitor from Bleeding Edge or Stable Release.
  2. Develop a Web service using NetBeans and deploy on GlassFish as described in screencast #ws7.
  3. Override the endpoint address for the generated client by following these instructions. The only difference in the new endpoint address is that the port number is 4040 instead of 8080.

That’s it, now every SOAP request message sent and response message received by this client is displayed in the wsmonitor console. The wsmonitor console dumps showing HTTP headers and request/response messages using SOAP and Fast Infoset are shown below.

HTTP headers for a SOAP MessageHTTP headers for a SOAP Message captured with Wsmonitor
SOAP Request and Response MessageSOAP Request and Response Message captured with Wsmonitor

#####

HTTP Headers for a FastInfoset MessageHTTP Headers for a FastInfoset Message captured using Wsmonitor

#####

FastInfoset Request and Response MessageFastInfoset Request and Response Message captured using Wsmonitor

转载请注明:WebLogic Android 博客 » wsmonitor (Web Services Monitor) – 开源Web服务监控软件