Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-408

Namespace repairing performed by StAXOMBuilder is incomplete with default namespaces

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.12
    • Fix Version/s: 1.2.13
    • Component/s: None
    • Labels:
      None

      Description

      The issue can be reproduced with the following code that uses Axis2's BeanUtil class (which creates an OMElement from a custom XMLStreamReader implementation):

      OMElement element = BeanUtil.getOMElement(new QName("urn:test", "test"), new Object[]

      { new DataHandler("test", "text/plain") }

      , null, false, null);
      System.out.println(element);
      System.out.println(element.getFirstElement().getAllDeclaredNamespaces().hasNext());

      The output is:

      <test xmlns="urn:test"><arg0 xmlns="">dGVzdA==</arg0></test>
      false

      This shows that xmlns="" is added by the serializer, but is not present in the object model. This is incorrect because the builder is also expected to perform namespace repairing, i.e. it should have added the corresponding namespace declaration when the object model was built.

      This is likely to cause issues in Rampart, in particular if DOOM is enabled. The reason is that the object model is passed to WSS4J/Santuario which expects the namespace information to be complete. Missing namespace declarations are likely to cause incorrect signature calculations.

        Attachments

          Activity

            People

            • Assignee:
              veithen Andreas Veithen
              Reporter:
              veithen Andreas Veithen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: