Java – how to print SOAP message content when using Apache axis
•
Java
I am using Apache axis for web service automation
I am preparing the soap request through axis and further accessing the web service What I'm looking for is how to print the soap request content that is compiling and accessing the web service
I found log4j helpful, but I'm trying to use it
Solution
You may no longer need this answer, but anyone else who stays here will encounter the same problem
The easiest way to retrieve requests and responses is to get them from an ongoing call In the stub generated by the axis, perform the following operations after calling:
String requestXML = _call.getMessageContext().getRequestMessage().getSOAPPartAsString(); String responseXML = _call.getMessageContext().getResponseMessage().getSOAPPartAsString();@H_301_14@希望能帮助到你.当我需要打印请求时,它帮助了我.
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码