IBM Support

PM91987: REDUNDANT NAMESPACE PREFIXES APPENDED FROM EACH SERIALIZATION REQUEST

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • For each serialization call (ie: XMLHelper.save()), an extra
    namespace prefix gets appended into the serialized output:
    ****************************************************************
    
    <?xml version="1.0" encoding="UTF-8"?>
    <Foo xmlns:ns0="http://TestDuplicateNamespace"
    xmlns="http://TestDuplicateNamespace"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="ns0:Foo">
      <prop>test</prop>
    </Foo>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <Foo xmlns:ns0="http://TestDuplicateNamespace"
    xmlns:ns1="http://TestDuplicateNamespace"
    xmlns="http://TestDuplicateNamespace"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="ns1:Foo">
      <prop>test</prop>
    </Foo>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <Foo xmlns:ns0="http://TestDuplicateNamespace"
    xmlns:ns1="http://TestDuplicateNamespace"
    xmlns:ns2="http://TestDuplicateNamespace"
    xmlns="http://TestDuplicateNamespace"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="ns2:Foo">
      <prop>test</prop>
    </Foo>
    
    ****************************************************************
    
    
    L2 has provided the following code, which demonstrates the
    extra namespace prefix that gets appended into the serialized
    output for each serialization call:
    
    - The pure XCI/SDO code:
    Map<String, Object> helperContextOptions = new HashMap<String,
    Object>();
    helperContextOptions.put(SDOUtil.OPTION_BO_COMPATIBLE, true);
    HelperContext hc =
    SDOUtil.createHelperContext(helperContextOptions);
    
    TypeHelper typeHelper = hc.getTypeHelper();
    DataFactory factory = hc.getDataFactory();
    XMLHelper xmlHelper = hc.getXMLHelper();
    
    URL url = new
    File("src/Schema/TestDuplicateNamespace.xsd").toURI().toURL();
    hc.getXSDHelper().define(url.openStream(),
    url.toExternalForm());
    
    Type type = typeHelper.getType("http://TestDuplicateNamespace",
    "Foo");
    DataObject foo = factory.create(type);
    foo.set("prop", "test");
    
    Map inOptions = new HashMap();
    commonj.sdo.helper.XMLDocument docResult = new
    XMLDocumentImplExt(hc,
    foo, "http://TestDuplicateNamespace", "Foo");
    inOptions.put(SDOUtil.OPTION_FAST_SERIALIZATION, true);
    inOptions.put(SDOUtil.OPTION_SAVE_INDENT, true);
    
    xmlHelper.save(docResult, System.out, inOptions);
    System.out.println();
    System.out.println();
    xmlHelper.save(docResult, System.out, inOptions);
    
    - The result with the second one containing the duplicate
    namespace
    prefix.
    <?xml version="1.0" encoding="UTF-8"?>
    <Foo xmlns:ns0="http://TestDuplicateNamespace"
    xmlns="http://TestDuplicateNamespace"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="ns0:Foo">
    <prop>test</prop>
    </Foo>
    
    <?xml version="1.0" encoding="UTF-8"?>
    <Foo xmlns:ns0="http://TestDuplicateNamespace"
    xmlns:ns1="http://TestDuplicateNamespace"
    xmlns="http://TestDuplicateNamespace"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:type="ns1:Foo">
    <prop>test</prop>
    </Foo>
    ====
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server                                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: For each call to serialize in           *
    *                      SDO/X, an extra namespace               *
    *                      prefix gets appended into the           *
    *                      serialized output.                      *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    During each serialization call, SDO/X has no recollection of
    previously generated namespace prefixes from previous
    serialization calls. As a result, it redundantly generates new
    namespace prefixes and appends it to the serialized output for
    each new request to serialize.
    

Problem conclusion

  • The algorithm in the XCI layer of SDO/X has now been updated
    to include a check for previously generated prefixes from
    previous serialization requests. As a result, the code will no
    longer append redundant namespace prefixes.
    
    The fix for this APAR is currently targeted for inclusion in
    fix packs 8.0.0.8 and 8.5.5.1.  Please refer to the
    Recommended Updates page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM91987

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2013-06-27

  • Closed date

    2013-07-10

  • Last modified date

    2013-10-01

  • APAR is sysrouted FROM one or more of the following:

    PM89169

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBSPHERE APP S

  • Fixed component ID

    5724J0800

Applicable component levels

  • R800 PSY

       UP

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
11 January 2022