Can any one please help me to know how to get the result -
I wan to fetch <m:GetStockPrice> part from the Soap Body
Expected result - <m:GetStockPrice>
Would any one help me to achieve this?
Joined: Mar 22, 2005
If you have this XML document in a string, and if you know that you'll always want to retrieve That specific part, and if you're certain that the structure won't change substantially, then some string operations (using indexOf and substring) should do the trick.
If you want to use SAAJ read and process the XML, then I have some examples in section 5.7 of my SCDJWS 5 Study Notes.
You can download the document in the SCDJWS Links section here or at http://www.javaforum.se/jforum/posts/list/549.page Best wishes!
Joined: Aug 03, 2006
I had a similar requirement of getting body from Soap. I wrote the following code which is working for me. Hope it helps you solving the problem.