Re: First row under header return null
"Scott Nichol" <[email protected]> Mon, 27 Sep 2004 16:43:49 -0400
| Newsgroups | gmane.text.xml.soap.devel |
|---|---|
| Message-ID | <02ca01c4a4d2$b1528840$6401a8c0@northgate> |
I assume you are receiving this message using the messaging API, i.e. your service has a method like
public void SubmitReq(Envelope env, SOAPContext reqCtx, SOAPContext resCtx)
throws Exception {
Vector headerEntries = env.getHeader().getHeaderEntries();
Element headerElement = (Element) headerEntries.firstElement();
// get "TransactionID" into elementName
String elementName = headerElement.getTagName();
// or...
String elementName = headerElement.getLocalName();
NodeList children = headerElement.getChildNodes();
// get "vas00001-sub" into text
String text = "";
for (int i = 0; i < children.getLength(); i++) {
Node n = children.item(i);
if (n.getNodeType() == Node.TEXT_NODE) {
s += n.getNodeValue();
}
}
}
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.