How can I get the name of the namespace from a SOAP message?

Posted by olly on Stack Overflow See other posts from Stack Overflow or by olly
Published on 2010-03-13T13:41:04Z Indexed on 2010/03/13 13:45 UTC
Read the original article Hit count: 318

Filed under:
|
|

Hi

I have a SOAP message (see below).

Using Xpath, how can I extract the name of the namespace from this message? In other words, is there an Xpath routine that will return the text "validateNewOrder"?

Any suggestions or help would be invaluable. I have been searching everywhere but not found an solution. It is driving me crazy...

Thanks!

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
   <ns1:validateNewOrder xmlns:ns1="http://sire.rabobank.nl/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <sireheader xmlns="http://sire.rabobank.nl/">
       <sender>
         <compid>TEST</compid>
       </sender>
     </sireheader>
     <order xmlns="http://sire.rabobank.nl/">
       <account>123456789</account>
     </order>
   </ns1:validateNewOrder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

© Stack Overflow or respective owner

Related posts about soap

Related posts about Xml