All | Personal | Quality | SailFin | Security in Glassfish AppServer | Sun
« My Experience with... | Main | JAXWS/SSL - How to... »
20070116 Tuesday January 16, 2007

GlassFishV2: How to see WSS SOAP messages glassfish_v2_webservices debug messages

In GlassFish v2/ Sun Java System Application Server 9.1, one can see the SOAP messages dump in the client console by doing the following 2 simple steps:
1) Edit client container configuration file, sun-acc.xml   to have the log level above WARNING (default) level. Say set at INFO level log.

        <log-service file="" level="INFO"/>

2)  Edit application client configuration file, sun-acc.xml  to update the wss debug property from 'false' to 'true'. See the following highlighted.
Example. <glassfish-install>/domains/domain1/config/sun-acc.xml
      <property name="debug" value="true"/>

Now you can re-run the webservice client again and see that SOAP messages are dumped on to the client console with new security elements (<wsse:>)

Example [ sample client side snapshot]:

     Jan 16, 2007 8:33:06 AM com.sun.xml.wss.impl.filter.DumpFilter process
     INFO: ==== Sending Message Start ====
     <?xml version="1.0" encoding="UTF-8"?>
     <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding
/" xmlns:ns0="http://tax.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc
e" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <env:Header>
     <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" env:mustU
nderstand="1">
     <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:
Id="XWSSGID-1168965182525-287094422">
     <wsse:Username>j2ee</wsse:Username>
     <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">*
***</wsse:Password>
     </wsse:UsernameToken>
     </wsse:Security>
     </env:Header>
     <env:Body>
     <ns0:getStateTax>
     <double_1 xsi:type="xsd:double">85000.0</double_1>
     <double_2 xsi:type="xsd:double">5000.0</double_2>
     </ns0:getStateTax>
     </env:Body>
     </env:Envelope>
     ==== Sending Message End  ====
         Jan 16, 2007 8:33:13 AM com.sun.xml.wss.impl.filter.DumpFilter process
     INFO: ==== Received Message Start ====
     <?xml version="1.0" encoding="UTF-8"?>
     <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding
/" xmlns:ns0="http://tax.org/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc
e" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <env:Body>
     <ns0:getStateTaxResponse>
     <result xsi:type="xsd:double">24000.0</result>
     </ns0:getStateTaxResponse>
     </env:Body>
     </env:Envelope>
     ==== Received Message End  ====

Posted by Jagadesh Babu Munta ( Jan 16 2007, 01:13:32 PM PST ) Permalink

Comments:

Post a Comment:

Comments are closed for this entry.

Calendar

RSS Feeds

Search

Links

Navigation

Referers