Glassfish and Web service request dumping for debugging

I have recently been working to get some web services to run on Glassfish, which uses Metro. The web services need to be called from different clients (some not even written in Java) and unfortunately not all clients work as documented. Sometimes it’s because of incorrect configuration, sometimes because of interoperability problems etc.

Comparing the requests sent by different clients makes it easier to debug the reasons for the problems. Since not all clients allow dumping the created requests upon sending, it would be nice if it was possible to ask Metro to do it. Fortunately, this is possible through configuration. For doing this, Arun Gupta describes the possible properties in his blog.

The easiest way is to add parameters

-Dcom.sun.xml.ws.assembler.client=true
-Dcom.sun.xml.ws.assembler.server=true

to your Glassfish domain’s domain.xml as jvm-options elements.

Submit a Comment

You must be logged in to post a comment.

*