Java Reference
In-Depth Information
<jvmarg
value="-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true"/>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<batchtest todir="${test.report.dir}">
<fileset dir="${test.classes.dir}"
includes="**/*Test.class" />
</batchtest>
</junit>
<echo message="-----Creating JUnit Report-----" />
<junitreport todir="${test.report.dir}">
<fileset dir="${test.report.dir}" includes="TEST-*.xml"/>
<report format="frames" todir="${test.report.dir}"/>
</junitreport>
<fail if="test.failed"
message="Tests failed. Check log and/or reports."/>
</target>
This is an easy way to get lots of information about what's going on behind the scenes in your
SOAP message invocation. If you have improperly constructed a message, for example, this
can be a terrific aid in finding the issue.
Example 4-6 shows the output that the HttpTransportPipe dump operation gives you during
a JUnit test invocation of a web service client talking to a credit authorizer web service (I ad-
ded line breaks only for readability).
Example4-6.Output of HttpTransportPipe during JUnit test
4/27/08-14:40 DEBUG
com.soacookbook.ch03.test.SchemaValidateTest.testCreditAuth -
Invoking Credit Authorizer Service.
---[HTTP request]---
SOAPAction: ""
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg,
*; q=.2, */*; q=.2
Content-Type: text/xml;charset="utf-8"
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body><creditCard xmlns="http://ns.soacookbook.com/credit">
<cardNumber>4011111111111111</cardNumber>
<name>
<firstName>Phineas</firstName>
Search WWH ::




Custom Search