SOAP Message Logging in GlassFish v2 and v3

I found a very nifty feature of GlassFish. You can configure GlassFish to log the contents of a SOAP request and response. I have found this to be very useful during development/debugging of Web Services. There is a different configuration parameter depending on which version of GlassFish you are using.

GlassFish 3

This configuration is very simple. Edit your domain config file, in my case, domains/domain1/config/domain.xml. Add the following entry in the java-config section:

  <!-- Setup SOAP messaging logging -->
  <jvm-options>-Dcom.sun.metro.soap.dump=true</jvm-options>

GlassFish 2

A similar config is available for GlassFish 2. Edit your domain config file, in my case, domains/domain1/config/domain.xml. Add the following entry in the java-config section:

        <!-- Setup SOAP messaging logging -->
        <jvm-options>-Dcom.sun.xml.ws.assembler.server=true</jvm-options>

I hope you find this tip useful 🙂

Did you like my blog post?

Signup now and receive an email when I publish new luv2code content.

I agree to have my personal information transfered to AWeber ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.

1 Comment

  1. Comments  Ion   |  Wednesday, 09 December 2015 at 7:57 pm

    Nice !

    Thanks !

Leave a Reply