cancel
Showing results for 
Search instead for 
Did you mean: 

What's the rule of ns0, ns1, ns2, ...

Former Member
0 Kudos

I created 3 messages, Message1, MessageA, MessageB and 2 message mappings

1. MessageA v.s Message1

2. MessageB v.s Message1

But I found in 1st mapping, Message1 uses "ns0" like the following:


<?xml version="1.0" encoding="UTF-8"?>
<ns0:Message1 xmlns:ns0="http://aaa/msg1">

In 2nd mapping, Message1 uses "ns1" like the following:


<?xml version="1.0" encoding="UTF-8"?>
<ns1:Message1 xmlns:ns0="http://aaa/msg1">

It's ok in XI, but when we send the messages to other applications through JMS, other systems confuse about it. And what's the rule for ns0, ns1? Could I change it ? thanks.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

If you want to get rid of the ns0..ns1...

Goto your Message Type (MT Definition). There is something called XML Namespace below the Data Type Name and Name Space text boxes. Delete the contents of the XML Namespace textbox.

The ns0,,,, ns1.... would not occur in the output of the Mapping

Regards,

Balaji.M

Former Member
0 Kudos

I think I found the rule. If the source and target message type come from different software components, then XI uses ns1 in target message type. I rebuild a same message in the same software component, it's ns0 now.

btw, I need to "rebuild", if I use "copy", then it still uses ns1.

Former Member
0 Kudos

Hi Dennys,

In general terms of XML these ns0, ns..... will be referred as alias name for the url. For example in the 1st section;

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Message1 xmlns:ns0="http://aaa/msg1">

ns0 is refferring to "http://aaa/msg1". Now if you want to refer this URL, then instead of this url you can mention ns0, that in turn will refer to the concerned url. Basically this is used for short name rather than using long string of url.

Regards,

Subhasha

henrique_pinto
Active Contributor
0 Kudos

> Hi Dennys,

>

> In general terms of XML these ns0, ns..... will be

> referred as alias name for the url. For example in

> the 1st section;

> <?xml version="1.0" encoding="UTF-8"?>

> <ns0:Message1 xmlns:ns0="http://aaa/msg1">

>

> ns0 is refferring to "http://aaa/msg1". Now if you

> want to refer this URL, then instead of this url you

> can mention ns0, that in turn will refer to the

> concerned url. Basically this is used for short name

> rather than using long string of url.

>

> Regards,

> Subhasha

It isn't alias, it's prefix.

And it isn't URL, it's namespace, which may be a URL or not (it is an URI, Universal Resources Identifier, and URL is just one of the several types of URIs. You could have an URN for namespace too, for example).

Regards,

Henrique.

Former Member
0 Kudos

Hi Henrique,

Thanks for the info. I will update you if I find more on it, anyways thanks for the given details.

Regards,

Subhasha

henrique_pinto
Active Contributor
0 Kudos

Oops,

it's not universal anymore.

Since some time ago, the U from URI stands for Uniform.

Then it is Uniform Resources Identifier... 😛

Regards,

Henrique.

Former Member
0 Kudos

I created 3 messages, Message1, MessageA, MessageB and 2 message mappings

1. MessageA v.s Message1

2. MessageB v.s Message1

But I found in 1st mapping, Message1 uses "ns0" like the following:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Message1 xmlns:ns0="http://aaa/msg1">

In 2nd mapping, Message1 uses "ns1" like the following:

<?xml version="1.0" encoding="UTF-8"?>

<ns1:Message1 xmlns:ns0="http://aaa/msg1">

It's ok in XI, but when we send the messages to other applications through JMS, other systems confuse about it. And what's the rule for ns0, ns1? Could I change it ? thanks.

Hi,

There is no need for cresting the ns0 , ns1 ,the system authomatical genrated the namespace in the back end in java ok .you need not worry about that

JMS identification or not .

Former Member
0 Kudos

hey

if you dont want to see the namespace in payload,then just dont give anythin in the XML namespace in mapping.it wont confuse the JMS system:)

have a look at the following

/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

thanx

Ahmad

Message was edited by:

Ahmad

justin_santhanam
Active Contributor
0 Kudos

Dennys,

While sending messages from other appln, there is no need to give the <ns0:Message1 xmlns:ns0="http://aaa/msg1"> tag itself. XI will take care of it.

Best regards,

raj.