cancel
Showing results for 
Search instead for 
Did you mean: 

ns0 in all the element tag of the XML output file

Former Member
0 Kudos

Hi Gurus,

I'm performing a mapping in the Integration Builder. The target structure is based on an imported xsd file via External Definitions.

However, in the output file, I'm getting a ns0 prefix in all the name of the elements.

Below is an example of how the output file looks like.

<ns0:Document xmlns:ns0="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">

<ns0:pain.001.001.02>

<ns0:GrpHdr>

<ns0:MsgId>0000000000247040099700</ns0:MsgId>

<ns0:CreDtTm>29-07-2008 16 44 06</ns0:CreDtTm>

<ns0:Authstn />

<ns0:BtchBookg>M</ns0:BtchBookg>

<ns0:NbOfTxs>1</ns0:NbOfTxs>

<ns0:Grpg>GRPD</ns0:Grpg>

Is there any way to get rid of the ns0? Issit some namespace definition which i need to specify somewhere?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

Is there any way to get rid of the ns0? Issit some namespace definition which i need to specify somewhere?

just remove the XML namespace in the message type (it can be blank, no problem).

Then, your message definition will not have any namespace prefixes.

regards

kummari

Former Member
0 Kudos

Hi Kummari,

Thanks for you reply. However, I did not define any data type or message type. I create a Interface Mapping using the imported xsd file via External Definitions as the target structure.

Former Member
0 Kudos

hi ,

Removing the following line from XSD will solve your problem.

xmlns="urn:xxxxxxx"

targetNamespace="urn:xxxxxxxxxxxx"

regards

kummari

Former Member
0 Kudos

HI Kummari,

You are the MAN!!!

it worked.. THANKS!!!!!!!!!!!!!

Full points awarded

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

It does not matter whether your namespace prefix is ns, ns0, xyz or whatever.

When your mapping doesn't work there must be another reason.

Just try and paste the payload from moni and test ur mapping.

The namespace prefic ns0 is only a placeholder for the namespace urn:iso:std:iso:20022:tech:xsd:pain.001.001.02. This namespace can also be represented by another prefix or even by the empty prefix.

However, it is not possible to model the target payload via a Message type in the Integration Repository.

Message types are simply not suitable to model a document as you have posted. However, there is simple help. Just download the schema for the Message type to your local file system. Add attribute elementFormDefault="qualified" to the root tag of that schema. Upload that schema as External Definition. This External Definition will have one External Message. Define your mapping using that schema.

Thanks

Swarup

Former Member
0 Kudos

Hi,

Thanks for your reply.

However, I did not define any Data Type or Message Type. The target structure is uploaded via External Definition and I created a Message Mapping using this XSD file as the target structure.

Former Member
0 Kudos

Hi,

Then probably you may try to modify the externally imported xsd file with adding attribute elementFormDefault="qualified" to the root tag of that schema.

Please let us know if this solves your problem.

Thanks

Swarup

Former Member
0 Kudos

Hi,

The attribute exist in the XSD file. Haha.

Below is the extract of the root of the XSD file.

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

<!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) -->

<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02" xmlns:xs="http://www.w3.org/2001/XMLSchema">

Former Member
0 Kudos

hey... ) ....then it should not be the problem...can you give the exact mapping error that you are facing..

Thanks

Swarup

Former Member
0 Kudos

Hi,

There is no mapping error, the XI is able output the XML file successfully, but just that in the XML file, there are ns0: prefix all over the place in the element tag name.