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

Cannot convert SAX to DOM attributes

XMLWordPrintable

      danoakland wrote:

      I ran into this same problem – it occurs when parsing a SOAP response and there is an attribute with a URI. The JBoss code that causes the exception is in the org.jboss.axis.message.SOAPElementAxisImpl at line 724. The 4.0.2 source code I downloaded shows this (starting with line 712):

      Code:

      if (uri != null && uri.trim().length() > 0)
      {
      // filterring out the tricky method to differentiate the null namespace
      // -ware case
      if (uri.equals("intentionalNullURI"))

      { uri = null; }

      if (qname.startsWith("xmlns:") == false && qname.startsWith("xsi:") == false)
      qname = "xmlns:" + qname;

      Attr attr = doc.createAttributeNS(uri, qname);
      attr.setValue(value);
      domAttributes.setNamedItemNS(attr);
      }

      What happens is that any attribute with a URI, say for example, "POS:lineTotal" ends up being passed to the Document.createAttributeNS method as "xmlns:POS:lineTotal".

            jgreene@redhat.com Jason Greene
            tdiesler@redhat.com Thomas Diesler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: