Hi,
I'm creating and sending the following xml to Apache SOAP:
*******************************************************************
POST /soap/servlet/messagerouter HTTP/1.1
...
...
<?xml version='1.0' encoding='UTF-8'?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<mm7:TransactionID s:mustUnderstand="1" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mm7="http://www.3gpp.org/MMS/Rel5/MM7">vas00001-sub</mm7:TransactionID>
</s:Header>
<s:Body>
<SubmitReq xmlns="urn:Something">
<MM7Version>5.3.0</MM7Version>
</SubmitReq>
</s:Body>
</s:Envelope>
*******************************************************************
When I try to get the TransactionID value under the header, it doesn't work.
Here the code:
*******************************************************************
env is a type Envelope.
Vector headerEntries = env.getHeader().getHeaderEntries();
Element headerElement = (Element) headerEntries.firstElement();
NodeList tempNodeList = headerElement.getElementsByTagName("*"); //I want the TransactionID.
Element tempElem = (Element)tempNodeList.item(0);
Node tempNode = tempElem.getFirstChild();
System.out.println((String)tempNode.getNodeValue().trim());
*******************************************************************
But when I use the following xml, it work:
*******************************************************************
POST /soap/servlet/messagerouter HTTP/1.1
...
...
<?xml version='1.0' encoding='UTF-8'?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<temp>
<mm7:TransactionID s:mustUnderstand="1" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mm7="http://www.3gpp.org/MMS/Rel5/MM7">vas00001-sub</mm7:TransactionID>
</temp>
</s:Header>
<s:Body>
<SubmitReq xmlns="urn:Something">
<MM7Version>5.3.0</MM7Version>
</SubmitReq>
</s:Body>
</s:Envelope>
*******************************************************************
The only different thing, is the <temp> and </temp> tag.
Is seem for some reason that the first line under the header tag can never been read, but if you add a level between TransactionID and Header, everything under the temp tag is reachable.
So how can I get the TransactionID without having to put the <temp> tag?
This could also be a misunderstanding from my part. Let me know.
Software involve:
Xerces-J-bin.2.2.0.zip
jakarta-tomcat-4.0.3.zip
j2sdk-1_4_1_07-solaris-sparc.sh
soap-bin-2.3.1.zip
Thank.
Ciao,
François.
François Fioramore
Project Manager
airwide solutions (formerly Schlumberger Messaging)
T: +1 (450) 646-7700 x210
M: +1 (514) 262-8540
F: +1 (450) 646-7004
1111 St-Charles St. West, 8th Floor, East Tower
Longueuil, Québec, J4K 5G4, Canada
________________________________________________________________________
airwide solutions is changing its email address format to [EMAIL PROTECTED]
Any slb.com email addresses will be valid until 30th September 2004.
________________________________________________________________________