cancel
Showing results for 
Search instead for 
Did you mean: 

Different Message Type, Different Namespace, same structure

holger_stumm2
Active Contributor
0 Kudos

Hi,

we have the scenario:

We have a message type (with our namespace) in a regular file-tofile scenario.

The sender is sending us an xml-file from his PI that has exactly the same structure and same xsd.

Except, that his message type name and namespace are different.

What is the scenario to get his message type and namespace mapped to my message type and namespace in a regular file-to-file scenario?

Thanks

hs

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, you could also remove namespaces with XMLAnonymizerBean, then you only need to adapt the message type.

Alternatively you can import the external definition of the message and create a mapping for that. You can reuse your existing message mapping, just do a copy and change the message type in the signature. Then you can correct structural inconsistencies automatically in order to adjust the mapping to the changed namespace and message type. Or even better, create a mapping template for the structure which you use in both message mappings. Like this, you have a separate interface and mapping for the file and thus a clear separation of message flow.

Regards, Martin

Answers (4)

Answers (4)

stefan_grube
Active Contributor
0 Kudos

> What is the scenario to get his message type and namespace mapped to my message type and namespace in a regular file-to-file scenario?

I rather would change message type name abd XMLNamespace in my PI.

Just copy your message type to another message type which is named as the root tag of the XML message.

Then change the XML namespace (not the message type name space) to the customer name.space.

If you have more questions, let me know.

Former Member
0 Kudos

Hi,

Create a new mesg type and namespace as what they are sending and develop th interface, or else do the java mapping for replacing the MT and NS.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Another option is you could use XSLT mapping in the beginning to get your requirement(change message type and namespace) followed by message mapping.

Shabarish_Nair
Active Contributor
0 Kudos

write a simple Java mapping to replace the namespace and MT name with yours and then use the regular mapping that you have post that.