0

I am linking to a webservice all works fine. Below is my codes.

private static void printSOAPResponse(SOAPMessage soapResponse) throws Exception {
        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer = transformerFactory.newTransformer();
        Source sourceContent = soapResponse.getSOAPPart().getContent();
        System.out.print("\nResponse SOAP Message = \n");
        StreamResult result = new StreamResult(System.out);     
        transformer.transform(sourceContent, result);
    }

I am not too sure of the transformerfactory. What I need to do now is to traverse through the results and look for below tag.

<Table diffgr:id="Table1" >

and there after there will be few tags in it for e.g.

<rID>1212</rID>
<sNo>15677</sNo>

So what is the best way as some require to covert it into string is that necessary?

2
Contributors
1
Reply
11
Views
3 Years
Discussion Span
Last Post by jwenting
0

well, take a look at the API docs for SOAPMessage and you'll soon find that it's a method to get the SOAPBody which is an Element which you can traverse to get the Nodes you want. It's iow just a standard XML Document Element.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.