Skip to Content
avatar image
Former Member

Unexpected namespace change after mapping change

Unexpected namespace change after mapping change

Posted: Apr 18, 2006 5:17 AM Reply

Hi all

We developped a mapping about one year ago on XI SP9.

The source of the message was an Idoc and the target an XML sample (and not a xsd!) of what our customer expected.

Everything was working fine at that point.

Here is an extract of the output we had:

<?xml version="1.0" encoding="UTF-8" ?>" xmlns:xsi="" xsi:schemaLocation="">

<env:Header xmlns:p="http://localhost/webs/msgDetails.xsd">

<p:msgDetails xmlns:p="http://localhost/webs/msgDetails.xsd">



<p:senderName>AUSTRALIA/NEW ZEALAND</p:senderName>



We are now running SP14 and we had to change the mapping. Since we changed it the namespaces defined in the sample XML we use as a target structure are not used anymore, instead they are replaced by ns0, ns1...

Now the output looks like this:

<?xml version="1.0" encoding="UTF-8" ?>" xmlns:ns0="" xmlns:ns1="" ns1:schemaLocation="">


<ns2:msgDetails xmlns:p="http://localhost/webs/msgDetails.xsd" xmlns:ns2="http://localhost/webs/msgDetails.xsd">






Any idea what has happened here?

Thanks in advance


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Apr 18, 2006 at 01:38 PM

    Hi Gregory,

    after a short view I would say that the two structures you have posted are logically equivalent.

    I try to make it clear for the sender-element.

    In the first example you have a tag <p:sender>. Obviously the namespace prefix 'p' is used here. In order to find out the qualified name of the element represented by that tag you have to find the namespace declaration for prefix p. As the tag itself does not contain such a declaration you have to go to the parent-tag. Indeed, here you find a declaration for p which says that p is just an alias for 'http://localhost/webs/msgDetails.xsd'. Hence the qualified name for the element is: 'sender' in namespace 'http://localhost/webs/msgDetails.xsd'.

    Now let us look at the corresponding tag <ns2:sender> in the second document. In oder to identify the qualified name of the element you have to find out, which namespace is bound to the namespace prefix ns2 which has been used here. Again you cannot find this in the tag itself but in its parent. Here you find that ns2 is bound to 'http://localhost/webs/msgDetails.xsd'. (Indeed, here you see that prefix p is also bound to that namespace. This seems to be superfluous to me, as the prefix is never used.)

    Consequently, the qualified name of that element is: 'sender' in namespace 'http://localhost/webs/msgDetails.xsd'.

    Thus, both tags represent elements with the same qualified name. For more details look at

    Greetings Stephan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Gregory,

      I don't know whether this change has to do with the upgrade to SP14. In fact no developper at SAP XI will care about changing namespace prefixes, as such a change is compatible according to the xml namespace standard.

      I think you should try to convince your partner that he should be compliant to well established standards.

      Greetings Stephan