axis2 - Java: How can I view the XML that is sent and received by ServiceClient.sendReceive? -


i trying debug issue having accessing soap api using .wsdl file using axis2. using method: http://axis.apache.org/axis2/java/core/api/org/apache/axis2/client/serviceclient.html#sendreceive(org.apache.axiom.om.omelement)

sendreceive throwing exception , cannot tell if because of being sent or because of server's response. able see xml sent , received, attempts of finding via packet sniffing foiled ssl. errors getting are:

soapprocessingexception first element must contain local name, envelope ,    found definitions  org.apache.axiom.soap.impl.builder.staxsoapmodelbuilder.constructnode    (staxsoapmodelbuilder.java:299) 

and

xmlstreamexception can not output xml declaration, after other output has  been done.  com.ctc.wstx.sw.basestreamwriter.throwoutputerror (basestreamwriter.java:1473) 

the first error makes me think should wrap request soapenvelope. when when second error. want able view xml can happening messages.

if you're on windows, install wireshark , monitor traffic on adapter determine being sent , received. on linux, read man page tcpdump(8)


Comments