on 02-13-2013 2:28 PM
Hi All,
This is inbound proxy scenario i.e Third party system --> PI --> SAP
I am using sap provided standard external definitions under both SI (inbound and outbound).
Below is the message header from third party
<?xml version="1.0" encoding="utf-8"?>
<n0:EPCISDocument schemaVersion="1.0" creationDate="2012-08-23T12:11:43+02:00">
<EPCISBody>
<EventList>
<AggregationEvent>
Below is the message header that SAP can accept
<?xml version="1.0" encoding="UTF-8"?>
<ns2:EPCISDocument schemaVersion="1.0" creationDate="2012-08-23T12:11:43+02:00" xmlns:ns2="http://sap.com/xi/PTA">
<EPCISBody>
<EventList>
<AggregationEvent>
the only difference is the namespace (Marked it in colour).
how can i add namespace in payload to make this interface successful?
Note: I know it can be done by using XSLT Mapping but I have to use standard sap SWC ( SCEMSRV ), can not use any mapping.
I can not copy the objects in to separate software component.
Regards,
pradeep A.
Hi Pradeep,
You have to use Mapping (Graphical/XSLT/Java) if you want to handle this within PI. I don't think at adapter level it would be possible.
Options:
1. Generate XSD of that Standard Data Type and provide that to Third Party team so that they can use that namespace.
2. You can handle that at the Target SAP side.
3. If you want to handle that through Graphical Mapping, please find the below blog:
Btwn, you can use Standard Content objects in your custom mapping or Enhance through Data Type Enhancement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sen,
i can not follow 3rd and 4th points because i have to use graphical mapping and customized SWCV.
Reg point 2: Actually message fails at SXMB_MONI of target sap side because of the missing namespace. if you know how to handle it please let me know.
Reg point 1: can be implemented, i know that and kept it as my last option.
my total intention is to handle it in Communication channel.
looking for some more replys.
Error message in SMXB_MONI.
<SAP:Category>XIProxy</SAP:Category>
</SAP:Error>
Regards,
pradeep A.
Hi Pradeep,
As per my understanding you wont be able to use Point 2 also, it requires Custom ABAP Program at Target SAP Side. I think you are using Standard Proxy at SAP side to handle this data.
Either you can go for Point 1 or you can write a Custom Java module which you can use at Sender Adapter to modify the namespace. But that's going to consume more effort. Not sure whether any other Standard SAP Module would be able to achieve your requirement.
Hi Pradeep,
You can apply xslt mapping from message transformbean.
Please see this link:
Regards,
Beena.
Thanks Beena,
i already looking on the similar link.
Regards,
Pradeep A.
Hi All,
check the input and output xml document attached to this mail.
The olny change that i am doing in PI is the change of namespace in the output under EPCISDocument (xmlns:ns0="http://sap.com/xi/PTA").
I already build the xsl but i have hardcoded the "creationDate" attribute which i was i don't want to.
Can any one modified the code attached to this mail.
Regards,
pradeep A.
Input File
<?xml version="1.0" encoding="UTF-8"?>
<EPCISDocument schemaVersion="1.0" creationDate="2012-08-23T12:11:43+02:00" xmlns:ns0="urn:epcglobal:epcis:xsd:1">
<EPCISHeader>
<StandardBusinessDocumentHeader xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
<HeaderVersion/>
<Sender>
<Identifier Authority=""/>
<ContactInformation>
<Contact/>
<EmailAddress/>
<FaxNumber/>
<TelephoneNumber/>
<ContactTypeIdentifier/>
</ContactInformation>
</Sender>
<Receiver>
<Identifier Authority=""/>
<ContactInformation>
<Contact/>
<EmailAddress/>
<FaxNumber/>
<TelephoneNumber/>
<ContactTypeIdentifier/>
</ContactInformation>
</Receiver>
<DocumentIdentification>
<Standard/>
<TypeVersion/>
<InstanceIdentifier/>
<Type/>
<MultipleType/>
<CreationDateAndTime/>
</DocumentIdentification>
<Manifest>
<NumberOfItems/>
<ManifestItem>
<MimeTypeQualifierCode/>
<UniformResourceIdentifier/>
<Description/>
<LanguageCode/>
</ManifestItem>
</Manifest>
<BusinessScope>
<Scope>
<Type/>
<InstanceIdentifier/>
<Identifier/>
<ScopeInformation/>
</Scope>
</BusinessScope>
</StandardBusinessDocumentHeader>
<extension/>
</EPCISHeader>
<EPCISBody>
<EventList>
<ObjectEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<baseExtension/>
<epcList>
<epc type=""/>
</epcList>
<action/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
<extension/>
</readPoint>
<bizLocation>
<id/>
<extension/>
</bizLocation>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<extension/>
<SAPExtension >
<SAPEventExtension>
<ParameterName/>
<ParameterValue/>
</SAPEventExtension>
<SAPEPCExtension>
<EPC type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPEPCExtension>
<SAPBizTransactionExtension>
<bizTransaction type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPBizTransactionExtension>
</SAPExtension>
</ObjectEvent>
<AggregationEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<baseExtension/>
<parentID type=""/>
<childEPCs>
<epc type=""/>
</childEPCs>
<action/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
<extension/>
</readPoint>
<bizLocation>
<id/>
<extension/>
</bizLocation>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<extension/>
<SAPExtension >
<SAPEventExtension>
<ParameterName/>
<ParameterValue/>
</SAPEventExtension>
<SAPEPCExtension>
<EPC type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPEPCExtension>
<SAPBizTransactionExtension>
<bizTransaction type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPBizTransactionExtension>
</SAPExtension>
</AggregationEvent>
<QuantityEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<baseExtension/>
<epcClass/>
<quantity/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
<extension/>
</readPoint>
<bizLocation>
<id/>
<extension/>
</bizLocation>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<extension/>
<SAPExtension >
<SAPEventExtension>
<ParameterName/>
<ParameterValue/>
</SAPEventExtension>
<SAPEPCExtension>
<EPC type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPEPCExtension>
<SAPBizTransactionExtension>
<bizTransaction type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPBizTransactionExtension>
</SAPExtension>
</QuantityEvent>
<TransactionEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<baseExtension/>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<parentID type=""/>
<epcList>
<epc type=""/>
</epcList>
<action/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
<extension/>
</readPoint>
<bizLocation>
<id/>
<extension/>
</bizLocation>
<extension/>
<SAPExtension >
<SAPEventExtension>
<ParameterName/>
<ParameterValue/>
</SAPEventExtension>
<SAPEPCExtension>
<EPC type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPEPCExtension>
<SAPBizTransactionExtension>
<bizTransaction type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPBizTransactionExtension>
</SAPExtension>
</TransactionEvent>
<extension/>
</EventList>
<extension/>
</EPCISBody>
<extension>1</extension>
</EPCISDocument>
Output File:
<?xml version="1.0" encoding="UTF-8"?>
<EPCISDocument schemaVersion="1.0" creationDate="2012-08-23T12:11:43+02:00" xmlns:ns0="http://sap.com/xi/PTA">
<EPCISHeader>
<StandardBusinessDocumentHeader xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
<HeaderVersion/>
<Sender>
<Identifier Authority=""/>
<ContactInformation>
<Contact/>
<EmailAddress/>
<FaxNumber/>
<TelephoneNumber/>
<ContactTypeIdentifier/>
</ContactInformation>
</Sender>
<Receiver>
<Identifier Authority=""/>
<ContactInformation>
<Contact/>
<EmailAddress/>
<FaxNumber/>
<TelephoneNumber/>
<ContactTypeIdentifier/>
</ContactInformation>
</Receiver>
<DocumentIdentification>
<Standard/>
<TypeVersion/>
<InstanceIdentifier/>
<Type/>
<MultipleType/>
<CreationDateAndTime/>
</DocumentIdentification>
<Manifest>
<NumberOfItems/>
<ManifestItem>
<MimeTypeQualifierCode/>
<UniformResourceIdentifier/>
<Description/>
<LanguageCode/>
</ManifestItem>
</Manifest>
<BusinessScope>
<Scope>
<Type/>
<InstanceIdentifier/>
<Identifier/>
<ScopeInformation/>
</Scope>
</BusinessScope>
</StandardBusinessDocumentHeader>
<extension/>
</EPCISHeader>
<EPCISBody>
<EventList>
<ObjectEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<baseExtension/>
<epcList>
<epc type=""/>
</epcList>
<action/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
<extension/>
</readPoint>
<bizLocation>
<id/>
<extension/>
</bizLocation>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<extension/>
<SAPExtension >
<SAPEventExtension>
<ParameterName/>
<ParameterValue/>
</SAPEventExtension>
<SAPEPCExtension>
<EPC type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPEPCExtension>
<SAPBizTransactionExtension>
<bizTransaction type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPBizTransactionExtension>
</SAPExtension>
</ObjectEvent>
<AggregationEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<baseExtension/>
<parentID type=""/>
<childEPCs>
<epc type=""/>
</childEPCs>
<action/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
<extension/>
</readPoint>
<bizLocation>
<id/>
<extension/>
</bizLocation>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<extension/>
<SAPExtension >
<SAPEventExtension>
<ParameterName/>
<ParameterValue/>
</SAPEventExtension>
<SAPEPCExtension>
<EPC type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPEPCExtension>
<SAPBizTransactionExtension>
<bizTransaction type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPBizTransactionExtension>
</SAPExtension>
</AggregationEvent>
<QuantityEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<baseExtension/>
<epcClass/>
<quantity/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
<extension/>
</readPoint>
<bizLocation>
<id/>
<extension/>
</bizLocation>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<extension/>
<SAPExtension >
<SAPEventExtension>
<ParameterName/>
<ParameterValue/>
</SAPEventExtension>
<SAPEPCExtension>
<EPC type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPEPCExtension>
<SAPBizTransactionExtension>
<bizTransaction type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPBizTransactionExtension>
</SAPExtension>
</QuantityEvent>
<TransactionEvent>
<eventTime/>
<recordTime/>
<eventTimeZoneOffset/>
<baseExtension/>
<bizTransactionList>
<bizTransaction type=""/>
</bizTransactionList>
<parentID type=""/>
<epcList>
<epc type=""/>
</epcList>
<action/>
<bizStep/>
<disposition/>
<readPoint>
<id/>
<extension/>
</readPoint>
<bizLocation>
<id/>
<extension/>
</bizLocation>
<extension/>
<SAPExtension >
<SAPEventExtension>
<ParameterName/>
<ParameterValue/>
</SAPEventExtension>
<SAPEPCExtension>
<EPC type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPEPCExtension>
<SAPBizTransactionExtension>
<bizTransaction type=""/>
<NameValuePair>
<ParameterName/>
<ParameterValue/>
</NameValuePair>
</SAPBizTransactionExtension>
</SAPExtension>
</TransactionEvent>
<extension/>
</EventList>
<extension/>
</EPCISBody>
<extension>1</extension>
</EPCISDocument>
XSLT code:
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="/EPCISDocument">
<ns0:EPCISDocument schemaVersion="1.0" creationDate="2012-08-23T12:11:43+02:00" xmlns:ns0="http://sap.com/xi/PTA">
<xsl:copy-of select="node()|@*"/>
</ns0:EPCISDocument>
</xsl:template>
</xsl:stylesheet>
Can you use the XSLT code from Zameer's reply in order to have the additional namespace
Hi Pradeep,
You can add attributes using
<xsl:copy-of select="@*"/> as below:
<xsl:template match="/EPCISDocument">
<ns0:EPCISDocument xmlns:ns0="http://sap.com/xi/PTA">
<xsl:copy-of select="@*"/>
<xsl:copy-of select="node()|@*"/>
</ns0:EPCISDocument>
</xsl:template>
However when I tried to run your xsl, getting same old namespace for header and body elements also.
Regards,
Beena
Hi All,
i know using XML Anonymizer Bean in Communication Channel is to remove/change name space prefix in XML payload.
can i use it to add a new namepace?
http://www.saptechnical.com/Tutorials/XI/XMLPayload/Index.htm
Regards,
pradeep A.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
Please check the below SAP Document.
http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm
"anonymizer.acceptNamespaces" can be used only to keep namespaces which are coming from Sender.
In your case, its not coming from Sender but you want to add before submitting message to Receiver.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.