axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/message SOAPDocumentImpl.java
Date Fri, 27 May 2005 15:34:36 GMT
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, "");
           }
  
  
  

Mime
View raw message