How to get SOAP messages when using the client generated by axis 1.4 wsdl2java

This can be a simple problem for anyone with moderate expertise in Web services using Apache axis

I have a web service client generated by wsdl2java in axis 1.4 I am writing a unit test that needs to access the actual SOAP message itself and compare it with the client Java class generated by axis (don't ask)

How do I retrieve the actual SOAP message from the service's response?

What I can collect from around the search is that I must get messagecontext I've tried these things

MessageContext mc = MessageContext. getCurrentContext(); String message = mc. getCurrentMessage(). getSOAPPartAsString();

But in this case, MC is null

Any help is appreciated!

Solution

This is how it is done

http://users.skynet.be/pascalbotte/rcx-ws-doc/jaxrpchandler.htm

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
分享
二维码
< <上一篇
下一篇>>