DB2 - Problembeschreibung
Problem IC67888 | Status: Geschlossen |
XML UPDATE REMOVES ELEMENT NAMESPACES WHEN USING "MODIFY DO INSERT <SOURCE-EXPRESSION> AFTER <TARGET-EXPRESSION>" | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problembeschreibung: | |
A document can be badly formed when using XML Update to modify a document using "MODIFY DO INSERT <source-expression> AFTER <target-expression>" In certain cases where the <source-expression> is a new element which has the same namespace declarations as the element in <target-expression> the namespaces from the <source-expression> will not be copied into the result document . There is a bug in the code logic which maintains the list of namespaces which are being copied along with the new element from the <source-expression> which results in incorrect results. Scenario below: Original document that needs to be updated: <ns:DataService xmlns:ns="http://www.mci.com/oagis/9"> <ns1:ID xmlns:ns1="http://www.openapplications.org/oagis/9">P9027048</ns 1:ID> <mci:ProvisioningStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:mci="http://www.mci.com/oagis/9" xmlns:ns3="http://www.openapplications.org/oagis/9/unqualifiedda tatypes/1.1" xmlns:ns4="http://www.openapplications.org/oagis/9/qualifieddata types/1.1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="Provisioning"> <oa:Code>NORMAL</oa:Code> </mci:ProvisioningStatus> </ns:DataService> New element we are inserting into original document using update with "insert after" ProvisioningStatus: <mci:MileStone xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:mci="http://www.mci.com/oagis/9" xmlns:ns3="http://www.openapplications.org/oagis/9/unqualifiedda tatypes/1.1" xmlns:ns4="http://www.openapplications.org/oagis/9/qualifieddata types/1.1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <oa:ID schemeName="LegID">OBP</oa:ID> </mci:MileStone> The updated document is badly formed: <ns:DataService xmlns:ns="http://www.mci.com/oagis/9"> <ns1:ID xmlns:ns1="http://www.openapplications.org/oagis/9">P9027048</ns 1:ID> <mci:ProvisioningStatus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:mci="http://www.mci.com/oagis/9" xmlns:ns3="http://www.openapplications.org/oagis/9/unqualifiedda tatypes/1.1" xmlns:ns4="http://www.openapplications.org/oagis/9/qualifieddata types/1.1" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" type="Provisioning"> <oa:Code>NORMAL</oa:Code> </mci:ProvisioningStatus> <mci:MileStone> <--- Missing namespaces (badly formed XML from the update) <oa:ID schemeName="LegID">OBP</oa:ID> </mci:MileStone> </ns:DataService> | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * In certain cases where the <source-expression> is a new * * element * * which has the same namespace declarations as the element in * * * * <target-expression> the namespaces from the * * <source-expression> * * will not be copied into the result document . There is a bug * * in * * the code logic which maintains the list of namespaces which * * are * * being copied along with the new element from the * * * * <source-expression> which results in incorrect results. * * * * * * * * Scenario below: * * * * * * * * Original document that needs to be updated: * * * * * * * * <ns:DataService xmlns:ns="http://www.mci.com/oagis/9"> * * * * <ns1:ID * * * * xmlns:ns1="http://www.openapplications.org/oagis/9">P9027048</ * 1:ID> * * * * <mci:ProvisioningStatus * * * * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" * * * * xmlns:oa="http://www.openapplications.org/oagis/9" * * * * xmlns:mci="http://www.mci.com/oagis/9" * * * * * * * * xmlns:ns3="http://www.openapplications.org/oagis/9/unqualified * tatypes/1.1" * * * * * * * * xmlns:ns4="http://www.openapplications.org/oagis/9/qualifiedda * types/1.1" * * * * * * xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" * * xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" * * * * xmlns:xsd="http://www.w3.org/2001/XMLSchema" * * * * type="Provisioning"> * * * * <oa:Code>NORMAL</oa:Code> * * * * </mci:ProvisioningStatus> * * * * </ns:DataService> * * * * * * * * New element we are inserting into original document using * * * * update with "insert after" ProvisioningStatus: * * * * * * * * <mci:MileStone * * * * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" * * * * xmlns:oa="http://www.openapplications.org/oagis/9" * * * * xmlns:mci="http://www.mci.com/oagis/9" * * * * * * * * xmlns:ns3="http://www.openapplications.org/oagis/9/unqualified * tatypes/1.1" * * * * * * * * xmlns:ns4="http://www.openapplications.org/oagis/9/qualifiedda * types/1.1" * * * * xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" * * * * xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" * * * * xmlns:xsd="http://www.w3.org/2001/XMLSchema"> * * * * <oa:ID schemeName="LegID">OBP</oa:ID> * * * * </mci:MileStone> * * * * * * * * The updated document is badly formed: * * * * * * * * <ns:DataService xmlns:ns="http://www.mci.com/oagis/9"> * * * * <ns1:ID * * * * xmlns:ns1="http://www.openapplications.org/oagis/9">P9027048</ * 1:ID> * * * * <mci:ProvisioningStatus * * * * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" * * * * xmlns:oa="http://www.openapplications.org/oagis/9" * * * * xmlns:mci="http://www.mci.com/oagis/9" * * * * * * * * xmlns:ns3="http://www.openapplications.org/oagis/9/unqualified * tatypes/1.1" * * * * * * * * xmlns:ns4="http://www.openapplications.org/oagis/9/qualifiedda * types/1.1" * * * * * * xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" * * xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" * * * * xmlns:xsd="http://www.w3.org/2001/XMLSchema" * * * * type="Provisioning"> * * * * <oa:Code>NORMAL</oa:Code> * * * * </mci:ProvisioningStatus> * * * * <mci:MileStone> * * * * <--- Missing namespaces (badly formed * * XML * * from the update) * * * * <oa:ID schemeName="LegID">OBP</oa:ID> * * * * </mci:MileStone> * * * * </ns:DataService> * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 9.5.6 * **************************************************************** | |
Local-Fix: | |
If possible, use BEFORE instead of AFTER, ie. "modify do insert <source-expression> BEFORE <target-expression>" | |
verfügbare FixPacks: | |
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows | |
Lösung | |
Fix was delivered to DB2 version 9.5.6 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 14.04.2010 30.06.2010 30.06.2010 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.5.6 | |
Problem behoben lt. FixList in der Version |