You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by to...@apache.org on 2005/05/27 17:34:36 UTC
cvs commit: ws-axis/java/src/org/apache/axis/message SOAPDocumentImpl.java
tomj 2005/05/27 08:34:36
Modified: java/src/org/apache/axis/message SOAPDocumentImpl.java
Log:
Fix bug 2019 - Bug in getElementsByTagNameNS() method of SOAPDocumentImpl class
http://issues.apache.org/jira/browse/AXIS-2019
Patch from Ashutoshi Shahi (ashutosh.shahi@gmail.com):
Combine the result of header and body in a NodeList and then return.
Revision Changes Path
1.13 +6 -5 ws-axis/java/src/org/apache/axis/message/SOAPDocumentImpl.java
Index: SOAPDocumentImpl.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/SOAPDocumentImpl.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- SOAPDocumentImpl.java 4 Feb 2005 00:31:06 -0000 1.12
+++ SOAPDocumentImpl.java 27 May 2005 15:34:36 -0000 1.13
@@ -412,6 +412,7 @@
String namespaceURI,
String localName) {
try {
+ NodeListImpl list = new NodeListImpl();
if (soapPart != null) {
SOAPEnvelope soapEnv =
(org.apache.axis.message.SOAPEnvelope) soapPart
@@ -419,19 +420,19 @@
SOAPHeader header =
(org.apache.axis.message.SOAPHeader) soapEnv.getHeader();
if (header != null) {
- return header.getElementsByTagNameNS(
+ list.addNodeList(header.getElementsByTagNameNS(
namespaceURI,
- localName);
+ localName));
}
SOAPBody body =
(org.apache.axis.message.SOAPBody) soapEnv.getBody();
if (body != null) {
- return body.getElementsByTagNameNS(
+ list.addNodeList(body.getElementsByTagNameNS(
namespaceURI,
- localName);
+ localName));
}
}
- return null;
+ return list;
} catch (SOAPException se) {
throw new DOMException(DOMException.INVALID_STATE_ERR, "");
}