on 10-05-2009 6:55 AM
Hi All,
I was working on the XMLAnonymizerBean adapter module. his module provides us the functinality of changing the prefix of namespace and selecting sprecified modules in the output XML. Now i am stuck with a question ie is there any module that can change the namespace in the output xml. for example :
xmnls : namespace1 to
xmnls : namespace 2.
dont think the XMLAnonymizerBean will help in this case.
you will have to go for a java or xslt mapping after the actual data mapping that will just do that feature for you.
a custom adapter module is also an option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was working on the XMLAnonymizerBean adapter module.
Now i am stuck with a question ie is there any module that can change the namespace in the output xml. for example :
Did you check Stefan's blog for this: /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
From the above blog:
You can use the bean for changing the default namespace to a requested one, which is obligatory in some rare scenarios, like
pidx.
Example: http://namespace1 '' http://namespace2 ns
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use XMLAnonymizerBean one more time else XSLT mapping.
can you provide your target structure and the structure which you are getting after XMLAnonymizerBean
Regards
Sruaj
Edited by: S.R.Suraj on Oct 5, 2009 2:05 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suraj,
Consider I have a ouput xml which is the input module as below:
Input to Module:
<Test xmlns:foo="urn:foo">
<foo:Bar>
<value>10</value>
</foo:Bar>
</Test>
I want the finalised structure as below:
Output of module:
<Test xmlns:foo="urn:foo123">
<foo:Bar>
<value>10</value>
</foo:Bar>
</Test>
Can please heip me out in this.
Thanks in adavance,
Siva
Did you tried using XML anonymizer bean at the receiver adapter channel module for changing the namespace
Otherwise best option is use the XSLT mapping as suggested by the suraj...
1.Implement your mapping logic done in message mapping and import the same in imported archiving and provide the same in interface mappings...
2.otherwise just created your message mapping as usual and use XSLT mapping as second mapping in your interface mapping just for changing the namespace...
second option is simpler as no need to touch the message mapping...
HTH
Rajesh
Hi,
You can use a simple XSLT mapping in Receiver adapter . check this blog
Provide the actual namespace in the bleow code
<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p2="provideyournamespace">
<xsl:template match="/">
<xsl:copy-of select="*"/>
</xsl:template>
</xsl:stylesheet>
Regards
Suraj
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.