How to get namespace header (soap Env)

Hi all,

I am fairly new to the world of webmethods i have to say quite enjoying using webemthodd anyhow i need some help.

i have exposed a web service using web service descriptor (7.0.1) now i need to get some extra info from the soap envelope… that is a namespace i have posted an example below i need to get a to strip of the header the value of ns1 (“http://www.company.com/test/test/1.0/”)

does anyone know how i can do this?

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:ns1=“http://www.company.com/test/test/1.0/”>

many thanks

HI,

You can use the wM Built in service pub.soap.utils:getHeader to get the header node of your SOAP message. Then you can get the specific node information by querying it using the service pub.xml:queryXMLNode service.

Thanks

Nithin…

thanks Nithin,

I am trying to make this work but i am find it a bit difficult but i am not sure if this what i want really, becasue what i am trying to get is in the soap envelope. so i want is the namespace in red.

<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:ns1="http://www.comp.com/version/1.0/">
soapenv:Header
ns1:xHeader
</ns1:xHeader>
</soapenv:Header>