Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2346

Issue with SAAJ API: SOAPBody.getElementsByTagNameNS() appears non-recursive

XMLWordPrintable

      We are trying to migrate our application into JBOSS 4.3EAP, perviously my webservice application was using Sun's saaj api. During the migration, we have been decided to use JBoss SAAJ api and we are seeing some weird problem with an API in SOAPBody class.

      Here is the sample code:

      NodeList list = soapMessage.getSOAPBody().getElementsByTagNameNS("urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0", "AdhocQueryResponse");
      System.out.println(list.getLength());
      list = soapMessage.getSOAPBody().getElementsByTagNameNS("urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0", "ExtrinsicObject");
      System.out.println(list.getLength());

      The first call to getElementsByTagNameNS() was returning the element list, but the subsequent call was returning an empty nodelist. I am attaching a sample java project created to reproduce the problem.

      See the following Javadoc: -

      http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/Element.html#getElementsByTagNameNS%28java.lang.String,%20java.lang.String%29

              rhn-support-asoldano Alessio Soldano
              rhn-support-dboeren David Boeren
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: