I have the same issue but the difference is that, the xml in the header has no namespace defined. The sample soapheader is as follows
<soapenv:Header> <Flight version="1" Name="flightdata" xmlns="http://www.abc.com"> <Airport code="lax"/> </Flight> </soapenv:Header> I want to extract the xml from the SoapHeader. My Java code is as follows SOAPHeaderElement soapHeader = soapEnvelope.getHeaderByName("", "Interface"); But the soapHeader is null. let me know how to get the handle to the xml within in the soapheader Thanks Kiran ----- Original Message ----- From: Dorner Thomas <[EMAIL PROTECTED]> Date: Mon, 16 Aug 2004 08:59:50 +0200 Subject: AW: SOAP-Header To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Thanks Anne for your quick reply, you are right, the namespace is wrong, but only in my email - I expand it in my code before. But I use the ResponseMsg instead of the RequestMsg!!! Thanks again Tomi -----Urspr�ngliche Nachricht----- Von: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 13. August 2004 20:21 An: [EMAIL PROTECTED] Betreff: RE: SOAP-Header Your namespaces don't match. Make this change: SOAPHeaderElement header = env.getHeaderByName("http://t-systems.de", "ClientID"); - Anne ________________________________ From: Dorner Thomas [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 11:28 AM To: '[EMAIL PROTECTED]' Subject: SOAP-Header Hello, can sombody please tell me, how I can get a HeaderElement in my ServiceIml, which I set in my ClientStub? When I do : Message rspmsg = mctx.getResponseMessage(); SOAPEnvelope env = rspmsg.getSOAPEnvelope(); SOAPHeaderElement header = env.getHeaderByName("http://t-systems.de/pdmwebConnector/clientid", "ClientID"); I get a null in my "header" !!!??? My SOAP-Header looks like this: <soapenv:Header> <ns1:ClientID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="http://t-systems.de">PDMWebConnectorClient</ns1:ClientID> <ns2:sessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns2="http://xml.apache.org/axis/session">-7457323948477159990</ns2:sessionID> </soapenv:Header> Thanks Tomi
