cancel
Showing results for 
Search instead for 
Did you mean: 

where do the ns0 ns1 ... xml namespaces come from? They mess up my mapping!

Former Member
0 Kudos

Hi

For some reason PI 7.1 inserts xml namespaces "ns0", "ns1" etc into the tags in the xml Invoice defined as an external definition.

Hence it expects those ns0 namespaces in the incoming message, but the incoming message does not have those namespaces!

Instead, the incoming message adheres to the imported "External Definition" Invoice.xsd (see the file under this link: http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/ )

Where the namespaces mainly are "com:" or "main:".

I have tested it both using the test under message mapping, operation mapping and by dropping a message and let it go thru the pipeline but all fail.

My questions are:

1) why does PI insert the ns0 namespaces?

2) why does PI not accept my source document instance even though the instance adheres to the "rules" in the Invoice.xsd (and imported schemas) which is used as the source External message?

3) How do I fix this?

BR

MIkael

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member181962
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Ravi

Thanks for your answer :-). I saw the blog but unfortunately I am not using Data type definition, as I have imported the schema as an "External Definition" and am using this directly as the source "schema".

The source message (which adhers to the Invoice.xsd schema) looks like this:

<ns1:BuyersReferenceID schemeID=""

/Mikael

former_member181962
Active Contributor
0 Kudos

Hi Mikael,

Check if this blog helps you:

/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

Regards,

Ravi Kanth talagana

Former Member
0 Kudos

Hi

I tried removing the namespaces from the invoice which is the source message in the test, but that did not solve the problem.

Why does PI insert the ns0 and ns1 namespaces?

Can it really be true, that I have to replace the namespaces in the source message from "com" to "ns0" all though the source message is valid according to the Invoice.xsd.

mikael

Former Member
0 Kudos

Hi

I tried removing the namespaces from the invoice which is the source message in the test, but that did not solve the problem.

Why does PI insert the ns0 and ns1 namespaces?

Can it really be true, that I have to replace the namespaces in the source message from "com" to "ns0" all though the source message is valid according to the Invoice.xsd.

mikael

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

Create data type for source message instead of using XSD,i hope this solve your problem.

Regards,

Raj