Hi Team,We are using webMethods 8.2 for our developement. Currently we are having our own canonical for the entire insurance with the complex structure (ESB Canonical). And the destination system also wants the same structure but with different namespace (Target Canonical). So we are having two schemas exactly 100% same but with the different namespace and imported in webMethods(e.g) comPolicy:policyNumber and targetPolicy:policyNumberNow we are having the requirement to map the ESB canonical to Target Canonical. sine this is a complex canonical, lots of values, document and document list are there. So we are facing difficulties in looping over each and every document list from ESB canonical and map it to target Canonical. I believe there will be some short cuts to map the above scenerio. Can you please help me to resolve this issue.thanks in advance.Regards,vijayakumar B
Is it the namespace name that needs to differ? Or just the namespace prefix?
Hi,
Both the namespace and namespace prefix are different.
XSLT may provide an easier way to modify the namespace name of a document.
Hi Reamon,Thanks for you reply. I am sure that XSLT will provide more flexibilty and easier way to map. But as i mentioned earlier, our canonical is so complex. Approximately we are having more than 3000 fields. So its again very difficult to write a XSLT to support the same.Is there any other way?
I’m not suggesting that you map all fields. I’m suggesting that you use XSLT to modify the namespace names in the doc. That should be much easier than trying to map all fields.
Another approach would be to have the destination system accept your namespace. I’m not sure I understand why they would care what the specific namespace name is–unless your document defintion took an industry standard doc type and modified it to use your own namespace names.
(Side note: namespaces are the root of much evil)
Have you tried using documentToXMLString, xmlStringToXMLNode, xmlNodeToDocument ??
Source comPolicy:policyNumber fed into documentToXMLString and targetPolicy:policyNumberNow comes out of xmlNodeToDocument ?? Namespaces can be used on both documentToXMLString & xmlNodeToDocument.
Cheers,
David