cancel
Showing results for 
Search instead for 
Did you mean: 

namespaces conflicts

Former Member
0 Kudos

Hi,

I've faced the following problem during mapping:

Returning message has smth. like this structure:

<MainElement ns1="...">value</MainElement>

......

<SubElement ns2="....">value</SubElement>

..........

So, as it becomes clear from this xml fragment, two elements have different namespaces. I can adopt xml schema definition to ns1(just point ns1 as target ns), so it becomes possible to read upper-level nodes. But the whole SubElement with ns2 and all its structure remains unavaliable for me, though I really need it

May be someone faced the trouble and knows how to solve it?? I've tried lots of combinations, e.g. putting ns2 as target ns in xsd file, but it's still no good.

Looking forward to any kind of help.

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

Have you an WSDL that you can upload to the Integration Repository?

Then you can map according to that WSDL and cosider the namespaces.

If not, Apply the XMLAnonymizerBean for removing the namespaces.

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

Regards

Stefan

Former Member
0 Kudos

Stefan's blog is really cool, but it describes the forward message processing, while I need to modify response msg. Any ideas how to do this? Or it doesn't matter, in which direction the msg goes?

Former Member
0 Kudos

Hi Dmitriy,

since you have change your response message, then you have to do a little workaround.............Stefan's blog applies to reciever adapters..........so get your response message via your sender adapter and without doing any mapping output it via reciever file adapter by using XMLAnonymiserBean and thereby removing namespaces in it and outputting it to a file.............

then via a sender file adapter, pick this response message file and do message mapping on it and then send it to the target system via your receiver adapter....

Regards,

Rajeev Gupta

Former Member
0 Kudos

RAJEEV, really interesting scenario... the matter is that I just use proxy on sender side, so it's impossible to use sender adapter

Former Member
0 Kudos

and....... I've done it!

again, I've used anonymizer bean, but not the same as in straight direction, and the second one. Moreover, I've put it after the standard soap module, so it was accessible for backward processing. So with it I've accessed response msg and was able to change all the namespaces.

Thanks to all.