Can't get elements from SOAPHeader correctly

So I have this SOAP message:

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<pid:pid   xmlns:pid="pt:ulisboa:tecnico:sdis:store:ws">carla</pid:pid>  </SOAP-ENV:Header> <S:Body><ns2:
loadResponse xmlns:ns2="urn:pt:ulisboa:tecnico:sdis:store:ws"/></S:Body>
</S:Envelope>

      

So you see pid = "carla"

But when I get all the attributes:

Iterator iter = hd.extractAllHeaderElements();
while(iter.hasNext()){
   System.out.println(iter.next());
}

      

All it prints is:

[pid:pid: null]

      

Any ideas why this isn't "carla"?

I do all this processing in handlers.

+3
java soap java-web-start


source to share


No one has answered this question yet

Check out similar questions:

3393
Create ArrayList from array
2248
Is a finally block always executable in Java?
2108
How can I call one constructor from another in Java?
1818
How to get enum value from string value in Java?
1
C # + Magento API V2: content type / xml text; encoding = UTF-8, text / XML; charset = UTF-8 response message does not match
1
Read SOAP XML with ASMX web servcie function
1
Invalid soapenv: Envelope when using Spring WebServiceTemplate
1
Can we rename a soapy response with multiple namespaces in a spring boot application?
1
How to handle SOAP response in FLEX 3
0
Copy input xml to output and remove unwanted namespace from it



All Articles
Loading...
X
Show
Funny
Dev
Pics