cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping Exception

Former Member
0 Kudos

Hi,

After using Conversion Agent module, the XML message causes a mapping exception in runtime.

By running Test Configuration and comparing with message type in IR, a very small difference makes the trouble.

"MT_invoice_out" is the message type.

The XML content in IR, correct one is:

<ns0:MT_invoice_out xmlns:ns0="http://com.hp.sap.jerry.ca">
.....
</ns0:MT_invoice_out>

The XML content in runtime, incorrect one is:

<MT_invoice_out xmlns="http://com.hp.sap.jerry.ca">
.......
</MT_invoice_out>

The only difference is "ns0". However, I do use the same XSD exported from XI when converting PDF to XML by Conversion Agent.

So is there any way to put "ns0" to generated XML message?

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Use the XMLAnonymizerBean.

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

Regards

Bhavesh

Former Member
0 Kudos

Yes, in this way I can add the prefix to each node in XML content. But my requirement is only to add prefix to the root element and make it to be <ns0:MT_invoice_out xmlns:ns0="http://com.hp.sap.jerry.ca">. Now, every node in XML is with a prefix! Is it possible to make it out? Thank you

bhavesh_kantilal
Active Contributor
0 Kudos

Does it matter if there is a prefix to every node? Does it still error out?

In that case, writing an adapter module should do the trick. But again is this prefix the actual cause of the problem?

Regards

Bhavesh

Former Member
0 Kudos

Yes, the prefix is the cause of my problem.

I can easily prove it by test in message mapping or by test configuration.

I don't know if you have tried Conversion Agent to translate a PDF to XML file before. I wonder there is any option that I can do some setting in CA to add the prefix to the root element only.

Former Member
0 Kudos

HI,

see the below link

[original link is broken]

Chilla

bhavesh_kantilal
Active Contributor
0 Kudos

><i>I don't know if you have tried Conversion Agent to translate a PDF to XML file before.</i>

Did try it. At the tech ED bangalore in one of the hands on. but you know the Hands on Sessions are if you have attended the tech Ed's.

I do hope there is a simple solution, but the worst case woulbe workaround like,.

1. Wrtie a module that will do this.

2. Write a java mapping that will just add the prefix and then the output of this java mapping will be the input to the graphical mapping ( interface mapping will cotnain 2 mapping programs)

Regards

Bhavesh

Former Member
0 Kudos

I will try your proposed solution later. Anyway, thank you so much!

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank God! It's solved finally.

After I reviewed all definitions in IR, the "XML namespace" when defining message type catched my eyes. After removal, the XML content has no namespace contained any more. I restarted my case, the expected result came out in a few seconds.

Thank all of you for your help!

Former Member
0 Kudos
Former Member
0 Kudos

The link is incorrect...

Former Member
0 Kudos

Hi,

As explained by and also check the below link

Regards

Chilla