X

Message Logging in WSIT Updated

An update to original set of properties is now available.

THE FOLLOWING PROPERTIES ARE PROPRIETARY.  THEY MAY CHANGE.

We are providing this information to help with development and debugging. 
These properties should not be used in deployments.

WSIT Pipeline
Assembler
exposes multiple system properties to enable SOAP message logging using
DumpPipe.
Each property, if it's value is set to true, injects a DumpPipe before or after
a WSIT component pipe in the pipeline. This allows the developer to monitor
message dumps at several points through out the pipeline, for example before and
after encryption. 

The legend that derives the property names is given below. A detailed list of
property names and their injection points are given in the table further below.
Example usages of these properties is given at the end. The table also shows a
convenience property, com.sun.xml.ws.assembler.XXX.action, that
displays only the wsa:To and wsa:Action header on XXX (client or server)
inbound and outbound messages.  

Legend:


  1. com.sun.xml.ws.assembler.client prefix indicates client-side
    properties
  2. com.sun.xml.ws.assembler.server prefix indicates server-side
    properties
  3. .after suffix indicates after (before) on client outbound
    (inbound) and server inbound (outbound).
  4. .before suffix indicates before (after) on client outbound
    (inbound) and server inbound (outbound). 



Table 1: List of property names and injection points

Property NameLocation
Client-side Properties
com.sun.xml.ws.assembler.clientRight before (after) the message is sent
(received) on client outbound
(inbound)
com.sun.xml.ws.assembler.client.actionwsa:To and wsa:Action
header value on client outbound and inbound
com.sun.xml.ws.assembler.client.transportRight before (after) Transport pipe on client outbound
(inbound)
com.sun.xml.ws.assembler.client.wss.afterRight after (before) SecurityPipe on client outbound
(inbound)
com.sun.xml.ws.assembler.client.wss.beforeRight before (after) SecurityPipe on client outbound
(inbound)
com.sun.xml.ws.assembler.client.wsrm.afterRight after (before) RMPipe on client outbound (inbound)
com.sun.xml.ws.assembler.client.wsrm.beforeRight before (after) RMPipe on client outbound (inbound)
com.sun.xml.ws.assembler.client.wstx.afterRight after (before) TxPipe on client outbound (inbound)
com.sun.xml.ws.assembler.client.wstx.beforeRight before (after) TxPipe on client outbound (inbound)
com.sun.xml.ws.assembler.client.wsa.afterRight after (before) WsaPipe on client outbound (inbound)
com.sun.xml.ws.assembler.client.wsa.beforeRight before (after) WsaPipe on client outbound (inbound)
Server-side Properties
com.sun.xml.ws.assembler.serverRight after (before) the message is received
(sent) on server inbound (outbound)
com.sun.xml.ws.assembler.server.actionwsa:To and wsa:Action
header value on server inbound and outbound
com.sun.xml.ws.assembler.server.transportRight after (before) Transport pipe on server inbound
(outbound)
com.sun.xml.ws.assembler.server.wss.beforeRight before (after) SecurityPipe on server inbound
(outbound)
com.sun.xml.ws.assembler.server.wss.afterRight after (before) SecurityPipe on server inbound
(outbound)
com.sun.xml.ws.assembler.server.wsa.beforeRight before (after) WsaPipe on server inbound (outbound)
com.sun.xml.ws.assembler.server.wsa.afterRight after (before) WsaPipe on server inbound (outbound)
com.sun.xml.ws.assembler.server.wsmex.beforeRight before (after) MexPipe on server inbound (outbound)
com.sun.xml.ws.assembler.server.wsmex.afterRight after (before) MexPipe on server inbound (outbound)
com.sun.xml.ws.assembler.server.wsrm.beforeRight before (after) RMPipe on server inbound (outbound)
com.sun.xml.ws.assembler.server.wsrm.afterRight after (before) RMPipe on server inbound (outbound)
com.sun.xml.ws.assembler.server.wstx.beforeRight before (after) TxPipe on server inbound (outbound)
com.sun.xml.ws.assembler.server.wstx.afterRight after (before) TxPipe on server inbound (outbound)

Example:


  1. If a message dump is required before and after the message is processed by
    WS-A pipe on the client outbound, then the following properties need to be
    set:

    -Dcom.sun.xml.ws.assembler.client.wsa.before=true and -Dcom.sun.xml.ws.assembler.client.wsa.after=true
  2. If a message dump is required before the message is sent and after it is
    received on the client, then the following property need to be set:

    -Dcom.sun.xml.ws.assembler.client=true 
  3. If all messages received by the RM pipe on server-side needs to be
    captured, then the following property need to be set:

    -Dcom.sun.xml.ws.assembler.server.wsrm.before=true

Notes:


  1. com.sun.xml.ws.assembler.client and com.sun.xml.ws.assembler.client.transport
    produce identical message dumps but allows an extensibility point if any
    other processing is required after the Transport pipe. This is also true for com.sun.xml.ws.assembler.server
    and com.sun.xml.ws.assembler.server.transport.

Technorati: WSIT SOAP
Web-services

Join the discussion

Comments ( 25 )
  • Arun Gupta's Blog Tuesday, July 10, 2007
    [Trackback] GlassFish V2 beta3 is now available. I take this opportune moment for a follow up entry showing how a Reliable WSIT endpoint can be invoked from WCF client and vice versa. WSIT is already integrated in GlassFish V2. The first...
  • Arun Gupta's Blog Wednesday, August 1, 2007
    [Trackback] Metro provides Secure, Reliable, Transactional and .NET 3.0 interoperable Web services stack in GlassFish. This entry explains how to enable SOAP message logging in Metro and .NET 3.0. The SOAP message logging in Metro is explained here. In WCF (the...
  • Arun Gupta's Blog Thursday, August 16, 2007
    [Trackback] I'm starting a new series today called Tip Of The Day. In this series I'll respond to technical questions asked directly to me, on forums or other aliases. These questions might have been answered else where and this will be...
  • Eric Dubuis Friday, October 12, 2007

    Hi

    Very interesting to know. Question: How can I monitor WS-MEX and / or WS-Transfer messages occurring during the bootstrap phase in WSIT?

    Regards,

    Eric


  • Arun Gupta Friday, October 12, 2007

    Depending upon which logging property is used, you can view all the messages that are exchanged at the runtime. For example, if you use com.sun.xml.ws.assembler.server then all the messages are dumped on the console.

    Are you looking for something else ?


  • Eric Dubuis Saturday, October 13, 2007

    By using the com.sun.xml.ws.assembler.server I can see the SOAP request and response at the server side which helps me a lot, thank you.

    Is there a logging property which allows to monitor the fetching of the WSDL description of the service? The HTTP monitor shows me the corresponding POST requeset, but I'd be interested in seeing the request's body (which I expect to be a WS-MEX request, but I'm not sure).


  • Arun Gupta Friday, October 19, 2007

    There are no properties available to do that. Although we may add it in the future. Can you try redirecting your tool request via a tool like wsmonitor (wsmonitor.dev.java.net) and then look at the messages ?

    -Arun


  • Meghnath Sharma Monday, December 3, 2007

    Hi Arun,

    I have one issue w.r.t to the SOAP message logging. I am using Weblogic workshop 8.1. I want to log the SOAP message (in HTTP form) to a specific file. And also I don't want the server console to contain the messages. How can i do this?

    One more condition is that - on the given weblogic server , there are arnd 12 webservices deployed, but i want the logging to be done only for a particular service (logging should be configurable; the code should not be modified again and again to turn the logging on and off)


  • Arun Gupta Monday, December 3, 2007

    Meghnath, are you using the Metro stack in Weblogic ? Otherwise you'll need to post your question to Weblogic forums.


  • Arun Gupta's Blog Friday, January 25, 2008
    [Trackback] Metro is the Web services stack in GlassFish. It is your one-stop shop from a simple Hello World to Secure, Reliable,  Transactional and .NET 3.0 interoperable endpoint. Metro Tooling is provided by NetBeans and other options are explained here. S...
  • Marshal Wednesday, January 30, 2008

    Hi Arun,

    As we already have such a good logging mechanism in Metro, why can't we improve it and open some APIs for developer for SOAP/HTTP dumping? Currently this system property only allows us to dump to System.out, and developers have to redirect that message to other streams they want. This is very coarse controlled and not good enough. For example, if she wants to save that message to a Database , under current mechanism, she still has to do quite a lot of work. An API will make things much neat and convenient.


  • Arun Gupta Wednesday, January 30, 2008

    Marshal, This is a good suggestion. Please file an RFE at https://wsit.dev.java.net/servlets/ProjectIssues


  • jack Wednesday, February 13, 2008

    Hi, Am trying to enable glassfish to view soap message for debugging. I tried locating the variable (eg. Dcom.sun.xml.ws.assembler.client.wsa.before) u place above in domain.xml but can't seem to find it.

    I have installed Netbeans 6.01 which came with glassfish v2. Do i need to install metro on to glassfish for me to pick this variable. DO let me know if i may miss anything out

    regards,

    Jack


  • Arun Gupta Thursday, February 14, 2008

    Jack,

    Metro is already baked into GlassFish so you don't need to download anything additional. You need to add this variable in domain.xml, it is not pre-configured.


  • Jack Saturday, February 16, 2008

    Thanks Arun for your reply. I check the documentation on domain.xml http://docs.sun.com/app/docs/doc/819-4723/abhar?a=view

    on adding the variables http://docs.sun.com/app/docs/doc/819-4723/6n6rtcrnb?a=view#abhau but kind of got lost when locating where to insert this for logging purposes.

    I tried to find which element in the domain (i.e. there was application,resources,config ..etc to insert this variable for logging purpose. Would you be able to tell which element I need to insert this variable and what xml sytnax is the jvm option correct i.e. I thought had to place a variable as jvm <jvm-option>-Dport-number=5500</jvm-option>

    Pls correct me if I am wrong. Any help is great appreciated.

    regards,

    jack


  • Jack Monday, February 18, 2008

    Hi Arun, Pls ignore my question above; managed to find the element (config) to insert this as a <jvm-option>-DXXXXX</jvm-option>. Work super fine.

    regards,

    Jack


  • Ozmen Adibelli Tuesday, April 1, 2008

    Hi Mr. Gupta,

    I am a member of thesis project(www.singleantelope.com) in my university in Turkey . We selected WSIT project for web services security. We try to implement a STS sample.

    My question is simple but I couldn't find the answer.

    Q: Is it possible to handle SOAP messages in WSIT steps?

    for example: (in calculator application in netbeans 6.1)

    in clientservlet file:

    org.me.calculator.client.CalculatorWS port = service.getCalculatorWSPort();

    int result=port.add(1,2);

    I want to show SOAP messages(request and response) to user in my servlet. Not only in Netbeans IDE glassfish console. My target aim is showing SOAP messages and SAMLs to user in a simple Client-STS-Service system.

    It will be great , if u help me.

    thanks.


  • Nadia Wednesday, April 23, 2008

    I’ve been reading your blog for quite a while. Thank you for sharing your thoughts. It is very useful


  • Fabian Ritzmann Friday, June 27, 2008

    Ozmen Adibelli, this blog entry explains how to do what you need:

    http://blogs.sun.com/ritzmann/entry/printing_soap_messages


  • Yarn Monday, September 1, 2008

    Great stuff.. Thanks a ton for sharing this.


  • Chris_rvm Tuesday, May 26, 2009

    Arun,

    Can you please help me find a solution to the following problem? I tried looking online but none of the posts were helpful.

    Requirement: We have a system where WCF Client communicates to Glassfish Server. For each WCF request that is sent to the Glassfish webservice, we want to send the username and password from WCF Client via SSL (using WS\* Standards) and then retrieve the username/password on the WSIT services so that we can perform our own authentication.

    Is this possible? If so, can you please provide the steps to do so asap?

    Thanks!!!


  • Arun Gupta Tuesday, May 26, 2009

    Have you tried posting question to users@metro.dev.java.net ?


  • Eric Dubuis Friday, April 16, 2010

    Arun,

    How is WSIT message logging with GlassFish V3 achieved?

    -Eric


  • Arun Gupta Monday, April 19, 2010

    Eric,

    If these properties do not work, please send a message to users@metro.dev.java.net.


  • praveen Friday, March 18, 2011

    I want to log raw soap post requests if there are any errors , I am using JAX-WS. Any help will be appreciated.

    Is there an easy way (aka: not using a proxy) to get access to the raw request/response XML for a webservice published with JAX-WS reference implementation (the one included in JDK 1.5 and better) only when exception occurs in response? I want to log raw SOAP reuest so that I can test it thorugh any webservice client at a later stage


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services