Connecting Tech Pros Worldwide Help | Site Map

Reading XML from Java

Member
 
Join Date: Mar 2008
Posts: 56
#1: Sep 26 '08
Hi I have an XML SOAP response which starts with the following XML:

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3. <soap:Body>
  4. <GetAppXmlResponse xmlns="http://***.***.gov.uk/***">
  5. <GetAppXmlResult>
  6. <Connector timestamp="9/26/2008 10:46:26 AM" xmlns="">
  7. <code>0</code>
  8. <message>Success</message>
  9. <getappxml>
  10. <![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  11. <Proposal>
  12. <SchemaVersion>1.1</SchemaVersion>
  13. <ApplicationHeader>Sample Header</ApplicationHeader>
  14.  
  15. //further nodes and elements
  16.  
  17. </Proposal>
  18. ]]>
  19. </getappxml>
  20. </Connector>
  21. </GetAppXmlResult>
  22. </GetAppXmlResponse>
  23. </soap:Body>
  24. </soap:Envelope>
Could somebody please explain to me how I access the Proposal node in java, so that I can create a new SOAP message out of it
Dököll's Avatar
Moderator
 
Join Date: Nov 2006
Location: Upstate NY - US
Posts: 2,260
#2: Nov 18 '08

re: Reading XML from Java


Any errors with this one!

Tell us what happens when you run this bit of code.

In a bit!
Moderator
 
Join Date: Mar 2006
Posts: 1,103
#3: Nov 19 '08

re: Reading XML from Java


Which classes are you using on your webservice to receive the soap message?
Reply