on 10-01-2010 8:33 PM
Hello
I have a requirement where the customer needs XML file with different format. How do I achieve the second format mentioned below instead of first format.
Normally we create the XML file in the following format:
- <Entries>
- <Organization>
<MemberName>0000000002</MemberName>
<FullName>BAY GYNECOLOGICAL ASSOCIATES</FullName>
<OrgId>0000000002</OrgId>
<OrgType>CUST</OrgType>
- <AssociatedToOrg>
<Name>0002</Name>
- </AssociatedToOrg>
</Organization>
Now the customer wants like the following format:
<Organization MemberName="522_Community_Customer" FullName="522 Community Customer" OrgId="DEA123456" OrgIdType="DEA" >
<AssociatedToOrg Name="MN"/>
</Organization>
Thanks
Naga
Hi Naga,
you don't need a XSL Mapping for this.
The difference between the two files is that one file has elements only and the other has elements as attributes.
<Organization MemberName="522_Community_Customer"....
Here, MemberName is an attribute of Organization.
An easy way to create such XML would be to use the XML that you want to create and let XMLSpy create an XSD out of the XML. Then load the XSD as external Definition in PI and create a graphical Mapping as usual.
You could also achieve the same by building the Message type manually, but this is by far more work.
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create a new Data Type with
Organization - as the root
MemberName - as attribute of the Organization
FullName - as attribute of the Organization
OrgId - as attribute of the Organization
OrgIdType - as attribute of the Organization
AssociatedToOrg - as sub element of Organization
Name - as attribute of the AssociatedToOrg
Use this in your messagetype and mapping
Thanks
Asif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can solve it with a XSL mapping. refer to the SDN to know how develop it
/people/aleksey.popov2/blog/2010/01/26/consuming-webservices-with-tag-in-wsdl-using-xslt
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/190eb190-0201-0010-0ab3-e69f70b6c257
http://wiki.sdn.sap.com/wiki/display/XI/XSLTMappingSteps
http://wiki.sdn.sap.com/wiki/display/XI/FileTOFile-UsingXSLTmapping%28forBeginners%29
http://wiki.sdn.sap.com/wiki/display/Snippets/ConvertflatXMLfiletonestedusing+XSLT
http://wiki.sdn.sap.com/wiki/display/Java/MultiMappingwithJavaandXSLTmappings
Edited by: Rodrigo Alejandro Pertierra on Oct 1, 2010 5:26 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.