Hi
   I have written a soap client(using apache soap api) and the structure of the response from the server is similar to this:
...
...
  <name9>valueOf9<name9>
   <name10>valueOf10</name10>
...
...
 
Now, I am retrieving the value of 'name10' like this:
Parameter result = response.getReturnValue();
Element root = (Element) result.getValue();
NodeList nodes = root.getElementsByTagName("name10");
message = nodes.item(0).getNodeValue();
The value of the message is null here. Can someone tell me what is wrong here?
 
But I got it working by modifying the above by:
message = nodes.item(0).getFirstChild().getNodeValue();
This returns 'valueOf10'. But from the above structure you can see that 'valueOf10' is not a node, so why I have to get the first child of 'name10' to retrive this value.
 
Or am I missing something here??
 
Thanks,
dw
 
 


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Reply via email to