cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT multiple mapping Exception

Former Member
0 Kudos

Hi everyone,

The Scenario is inbound. File to Proxy. I've been dealing with this error for the last couple of weeks and I've come to the end if ideas. PI version I have is PO 7.4. I've developed a multi mapping solution, where MM fills the data into 6 messages, based on field values. I can test the MM and OM (I've got a XSLT transform in there as well) and the test shows the result, I am looking for. No errors whatsoever. XML is well formatted. when I am doing end to end testing, it is showing error in Message monitoring but if i take the payload and test in OM, It gets successful.

I am getting the below error.

Mapping "urn:SBM.com:ERP:Parts:StarOrder:IN:Async/OM_PartsOrder_StarOrder_Async_Out" failed to execute: MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_PartsOrder_StarOrder_Async_Out_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /ns0:Messages/ns0:Message1. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD, ApplicationRuntimeException: Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_PartsOrder_StarOrder_Async_Out_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /ns0:Messages/ns0:Message1. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD, IllegalInstanceException: Cannot create target element /ns0:Messages/ns0:Message1. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD

The XSLT which I am using is -

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"> <ns0:Message1> <xsl:apply-templates select="node()" /> </ns0:Message1> </ns0:Messages> </xsl:template> <xsl:template match="*[not(self::Recordset)]"> <xsl:copy> <xsl:apply-templates select="node()" /> </xsl:copy> </xsl:template> </xsl:stylesheet>

The Inbound record looks like this

<?xml version="1.0" encoding="UTF-8"?> -<ns:MT_StarOrder_TP xmlns:ns="urn:SBM.com:ERP:Parts:StarOrder:IN:Async"> -<Recordset> -<RECORD> <Record_Type>+00</Record_Type> <Company_Code>+000000</Company_Code> <Order_Type>+000000</Order_Type> <Delivery_Note_No_Part_1>+61207</Delivery_Note_No_Part_1> <DeliveryNoteLineItemNo/> <Dispatch_Mode/> <Batch_Indicator>A0</Batch_Indicator> <Order_Part_No>0000000 00</Order_Part_No> <Order_Qty>WERK 9</Order_Qty> <Meas_Unit>6</Meas_Unit> <Cust_Ord_Line_No>BATCH-</Cust_Ord_Line_No> <BHW>RUN-NO.207 /</BHW> <Filler1/> <Customer_Ord_No>26.03.1</Customer_Ord_No> <Currency_Code>8 14</Currency_Code> <Filler2>.47</Filler2> <Filler3>.</Filler3> <Promo_Id>38CLOC</Promo_Id> <Information_Indicator>K</Information_Indicator> </RECORD></Recordset> </ns:MT_StarOrder_TP>

Please suggest.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Evgeniy,

Thanks for the reply. There was issue with XSLT mapping. I have corrected it and it started working.

Thanks again.!

Pardeep

former_member190293
Active Contributor
0 Kudos

Hi Pardeep!

When you use multimapping, elements Message1..MessageN should always be created. I guess that your XSL transformation doesn't create one for particular message type(s).

When you test your mapping in ESR - no mulimessage structure validation is performed. But during end-to-end processing Mapping runtime requires structure with all MessageN elements present even if no respective message root elements are in place.

Regards, Evgeniy.