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?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.