on 04-07-2011 2:23 PM
Hi All,
i tried to add three namespaces to the receiver file, for example
<?xml version="1.0" encoding="utf-8" ?>
<PostBrandOccurrence releaseID="1.1"
xmlns="http://www.ford.com/oagis" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<oa:ApplicationArea>
<oa:Sender>
but not succeded, please let me know how to add.
Regards,
Pradeep.
Edited by: Pradeep Amisagadda on Apr 7, 2011 3:23 PM
Use XSLT Mapping to add three namespaces.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
from my point of view it is the easiest if you do that with XSLT. Just right the style content as the output should be and add the text nodes with xsl:value-of, address repeatable fields with xsl:for-each.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Martens,
my structure is show below, the below namespace has to replace with three namespaces xmlns="http://www.ford.com/oagis" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
please provide me the XSLT ..
INPUT.
<?xml version="1.0" encoding="UTF-8"?>
<PostBrandOccurrence revision="1.0.0" xmlns="http://www.openapplications.org/oagis">
<ApplicationArea>
<Sender>
<LogicalID> </LogicalID>
<ComponentID> </ComponentID>
<TaskID> </TaskID>
<AuthorizationID>d </AuthorizationID>
</Sender>
<CreationDateTime> </CreationDateTime>
<BODID/>
</ApplicationArea>
<DataArea>
<BrandOccurrence>
<MetaOrderNumber> </MetaOrderNumber>
<EventCode> </EventCode>
<BrandEventTimeStamp> </BrandEventTimeStamp>
<BrandProcessTimeStamp> </BrandProcessTimeStamp>
</BrandOccurrence>
</DataArea>
</PostBrandOccurrence>
OUTPUT.
<?xml version="1.0" encoding="utf-8" ?>
<PostBrandOccurrence releaseID="1.1"
xmlns="http://www.ford.com/oagis" xmlns:oa="http://www.openapplications.org/oagis/9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<oa:ApplicationArea>
<oa:Sender>
<oa:LogicalID> </oa:LogicalID>
<oa:ComponentID> </oa:ComponentID>
<oa:TaskID> </oa:TaskID>
<oa:AuthorizationID> </oa:AuthorizationID>
</oa:Sender>
<oa:CreationDateTime> </oa:CreationDateTime>
<oa:BODID> </oa:BODID>
</oa:ApplicationArea>
<DataArea>
<oa:Post />
<BrandOccurrence>
<MetaOrderNumber> </MetaOrderNumber>
<EventCode> </EventCode>
<BrandEventTimeStamp> </BrandEventTimeStamp>
<BrandProcessTimeStamp> </BrandProcessTimeStamp>
</BrandOccurrence>
</DataArea>
</PostBrandOccurrence>
Regards,
Pradeep A.
Hi Pradeep,
Why go for adding namespace at mapping runtime? It would be a good idea to add the desired namespaces and prefixes at the datatype/xml structure definition stage. You can create an XSD definition for your target file structure with the desired namespace and attribute information. This way the information would be available on your target XML docutment and you dont need do any mapping/program for this.
Regards,
Suddhasatta
Hi Pradeep,
I had similar requirements , i have achived this using Java.
I am not having the code at this moment.
But the logic is
1) get the the payload from input stream . get the XML content
2) convert the XML into String
3) use replaceFirst or replaceAll function and replace the current namespace with ur new namespace.
4) write the same in outputstream
Hope this will help you.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.