cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the Namespace of the payload

Former Member
0 Kudos

Hi,

I have 2 questions about the namespace of the XML Payload.

1. How can I change the Namespace Prefix?

Since we have SP13 the prefix is <b>p2</b> with the previous Versions the prefix was <b>p1</b> or <b>p0</b> . Is there a possibility to change this prefix (without an external XSLT or Java Mapping)?

2. How can I change the whole Namespace?

I know the function of the Message-Type to change the namespace of the Message. But in one scenario I have to implement 3 namespace statements and 1 schema location

<b><ns0:ZMCFAUF1 xmlns:ns0="TDB" xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="TDB zmcfauf1.xsd"></b>

Is there a possibility to implement this without an external Mapping?

Thank you for your help

Thomas<b></b>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thomas,

You can do this, (not sure what you mean as external mapping, but to implement we use Java mapping)

check my replies in this msg link

Regards

Vishnu

Former Member
0 Kudos

Hi Vishnu,

actually I use a Java Mapping like you described it (that was what I mean with external mapping). It works, but I think it is just a work around ;o)

Thank you for your help

Thomas

Former Member
0 Kudos

Hi Thomas,

according to your first question: Why does this matter to you? As I already wrote in another thread:

According to the XML namespace declaration the prefixes are just internal aliases with no external meaning.

E.g. <ns1:abc xmlns:ns1="http://www.sap.com" /> and

<iLikeLongPrefixes:abc xmlns:iLikeLongPrefixes ="http://www.sap.com" /> are totally equivalent according to the XML namespace specification.

Therefore, everyone (human or machine) who produces a program can choose the prefixes as he wants. Moreover, he may change the rules for creating these prefixes without being incompatible.

Consequently, the namespace prefixes should not be important for you.

Greetings

Stephan

Former Member
0 Kudos

Hello Stephan,

that's correct the different namespace prefix should not be a problem. But in some cases it is a problem. (The reason may be a bad implementation on the receiving site)

To avoid this problem I implemented a Java Mapping which manipulate the namespace and namespace prefix.

How is this prefix generated by the XI? An internal number?

Thank you for your help

Thomas

Former Member
0 Kudos

Hi Thomas,

indeed there is currently no possibility to influence the prefix used for a certain namespace from the outside. It is somehow like drawing an internal number.

Thus, indeed, you will have to use a java mapping or an xslt mapping.

Greetings Stephan

Answers (0)