Java Reference
In-Depth Information
NOTE
Using the console dumper is not appropriate for production situations, but it can save you lots of time
during development.
Dumping during a Maven unit test run
It is useful to see the SOAP messages being passed during an execution of unit tests. This is
easy to do if you are running your build directly from the command line or from within an
IDE, both of which offer a clear way to send arguments to the VM during execution.
But if you're building from Maven 2, it may not be immediately apparent how to get this to
work. All you have to do is add a system property to the Surefire plug-in, like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<systemProperties>
<property>
<name>wsdlLocation</name>
<value>${my.wsdl.url}</value>
</property>
<property>
<name>com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump</name>
<value>true</value>
</property>
</systemProperties>
</configuration>
</plugin>
This will create the same effect as passing the argument directly to the VM as you would with
-D .
Transport-independent logging
The preceding examples work if you are using HTTP as the transport layer. If you are using
a different protocol, you need a transport-agnostic class. Using basically the same mechanism
just described, you can substitute this invocation instead:
com.sun.xml.ws.util.pipe.StandaloneTubeAssembler.dump=true
Search WWH ::




Custom Search