Getting Raw XML From SOAPMessage in Java

前端 未结 9 1930
醉梦人生
醉梦人生 2020-12-02 06:41

I\'ve set up a SOAP WebServiceProvider in JAX-WS, but I\'m having trouble figuring out how to get the raw XML from a SOAPMessage (or any Node) object. Here\'s a sample of t

9条回答
  •  萌比男神i
    2020-12-02 06:41

    if you have the client code then you just need to add the following two lines to get the XML request/response. Here _call is org.apache.axis.client.Call

    String request = _call.getMessageContext().getRequestMessage().getSOAPPartAsString();
    String response = _call.getMessageContext().getResponseMessage().getSOAPPartAsString();
    

提交回复
热议问题