Dienstag, 19. Juli 2011

How to enable java ws logging to resolve "No content-type in the header" problems

Today I had the problem that one of my webservice methods always threw this - not very telling - exception:

javax.xml.ws.WebServiceException: No Content-type in the header!

After some Google research I found out that there's the following flag, which enables extended logging for java webservice calls. This system environment setting must present when Tomcat (or any other webserver) is starting:

-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true

Using the output I quickly found the problematic piece of code.

Keine Kommentare:

Kommentar veröffentlichen