Skip to Content
0

What could be the reason for this error in SAP PI Interface determination & Mapping test?

Mar 01, 2017 at 01:10 PM

680

avatar image
Former Member

Hi everyone,

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 7.11.

I've developed a multimapping solution, where MM fills the data into two 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 formated, I am using a copy of the message from the production system.

However, when I go into Integration Builder and test my Receiver Determination scenario with the same data, I get the following error:

<SAP:Category>XIServer</SAP:Category> <SAP:Code area="MAPPING">GENERIC</SAP:Code> <SAP:P1>com/sap/xi/tf/_MM_TESTMAPPING_</SAP:P1> <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2> <SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.ParserE</SAP:P3> <SAP:P4>xception: XMLParser: No data allowed here (:main:~</SAP:P4> <SAP:AdditionalText/> <SAP:Stack>com/sap/xi/tf/_MM_TESTMAPPING_com.sap.aii.utilxi.misc.api.BaseRuntimeException:Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here (:main:~ </SAP:Stack>

Unfortunatelly, the log is truncated and when I go to NetWeaver Administrator and into Log Viewer, I see 5 or 6 error messages, that all have the following lines in common:

Caused by: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here (:main:, row:55, col:8)

Caused by: com.sap.engine.lib.xml.parser.NestedSAXParseException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here (:main:, row:55, col:8)

Any ideas or suggestions?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

avatar image
Former Member Mar 01, 2017 at 01:48 PM
1

Hi Demsar,

1. Try to take the payload from the from the message monitor and place it in the message mapping and check if it process successfully.

2. I think you are trying to do 1:n mapping in it. Are you able to do any 1:n mapping of this similar format before in this version.

If not could you please try with some simple mapping for 1:n interface and test it complete end to end and check if you are getting any similar error.

3. If possible could you please share the source and target structure and the confiugration of MM and OM.

Regards,

Avinash.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi,

below is the log of the operation mapping test:

10:33:04 Start of test

  • Creating mapping sequence with 2 steps.
  • Creating step 0.
  • Creating step 1.
  • Start executing mapping sequence with 2 steps.
  • Executing mapping step 0
  • Call XSLT processor with stylsheet FONTMAN_2_SAP.xsl.
  • Returned form XSLT processor.
  • XSLT transformation: FONTMAN_2_SAP.xsl completed with 0 warning(s).
  • Mapping step 0 has been executed.
  • Executing mapping step 1
  • Loaded class com.sap.xi.tf._MM_FSTR006_2_ROUTEACCOUNT_STORNO_
  • Document start
  • Start tag [ns0:Messages]
  • Add raw attribute [ xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"]
  • Start tag [ns0:Message1]
  • Start tag [ns1:MT_ROUTEACCOUNT]
  • Add raw attribute [ xmlns:ns1="urn:lj-mlek.si:frontman"]
  • Start tag [ID]
  • Put value [4761231]
  • Close tag [ID]
  • Start tag [INTERFACE]
  • Put value [FS_TR_006]
  • Close tag [INTERFACE]
  • Start tag [CCUSVI0]
  • Start tag [ISGENERALHD]
  • Start tag [TOUR_ID]
  • Put value [425585]
  • Close tag [TOUR_ID]
  • Start tag [MISSION_ID]
  • Put value [1]
  • Close tag [MISSION_ID]
  • Close tag [ISGENERALHD]
  • Start tag [ISCUSTOMERHD]
  • Start tag [VISIT_ID]
  • Put value [5]
  • Close tag [VISIT_ID]
  • Start tag [CUSTOMER]
  • Put value [101567]
  • Close tag [CUSTOMER]
  • Start tag [CPD]
  • Put value [0]
  • Close tag [CPD]
  • Close tag [ISCUSTOMERHD]
  • Start tag [ISCUSTOMERADDR]
  • Start tag [VISIT_ID]
  • Put value [5]
  • Close tag [VISIT_ID]
  • Start tag [NAME1]
  • Put value []
  • Close tag [NAME1]
  • Start tag [CITY]
  • Put value []
  • Close tag [CITY]
  • Start tag [POSTAL_CODE]
  • Put value []
  • Close tag [POSTAL_CODE]
  • Start tag [STREET]
  • Put value []
  • Close tag [STREET]
  • Close tag [ISCUSTOMERADDR]
  • Close tag [CCUSVI0]
  • Start tag [CDELFU0]
  • Start tag [ISGENERALHD]
  • Start tag [TOUR_ID]
  • Put value [425585]
  • Close tag [TOUR_ID]
  • Start tag [MISSION_ID]
  • Put value [1]
  • Close tag [MISSION_ID]
  • Close tag [ISGENERALHD]
  • Start tag [ISDELIVERYHD]
  • Start tag [VISIT_ID]
  • Put value [5]
  • Close tag [VISIT_ID]
  • Start tag [HH_DELIVERY]
  • Put value [D03970531]
  • Close tag [HH_DELIVERY]
  • Start tag [TIMESTAMP]
  • Put value [2017-02-20T11:15:33.0000000+01:00]
  • Close tag [TIMESTAMP]
  • Start tag [TA_STATUS]
  • Put value [2]
  • Close tag [TA_STATUS]
  • Start tag [REASON]
  • Put value [0]
  • Close tag [REASON]
  • Start tag [STORNO]
  • Put value [0]
  • Close tag [STORNO]
  • Close tag [ISDELIVERYHD]
  • Start tag [CS_DEL_HD]
  • Start tag [BSTKD]
  • Put value []
  • Close tag [BSTKD]
  • Start tag [BSTDK]
  • Put value []
  • Close tag [BSTDK]
  • Close tag [CS_DEL_HD]
  • Start tag [ISDELIVERYITM]
  • Start tag [VISIT_ID]
  • Put value [5]
  • Close tag [VISIT_ID]
  • Start tag [HH_DELIVERY]
  • Put value [D03970531]
  • Close tag [HH_DELIVERY]
  • Start tag [HH_DELIVERY_ITM]
  • Put value [10]
  • Close tag [HH_DELIVERY_ITM]
  • Start tag [BE_DELIVERY_ITM]
  • Put value [0]
  • Close tag [BE_DELIVERY_ITM]
  • Start tag [MATERIAL]
  • Put value [40578]
  • Close tag [MATERIAL]
  • Start tag [QUANTITY]
  • Put value [1.000]
  • Close tag [QUANTITY]
  • Start tag [UOM]
  • Put value [KOS]
  • Close tag [UOM]
  • Start tag [TA_CODE]
  • Put value [0]
  • Close tag [TA_CODE]
  • Start tag [TA_STATUS]
  • Put value [0]
  • Close tag [TA_STATUS]
  • Close tag [ISDELIVERYITM]
  • Start tag [ITDELIVERYCOND]
  • Start tag [VISIT_ID]
  • Put value [5]
  • Close tag [VISIT_ID]
  • Start tag [HH_DELIVERY]
  • Put value [D03970531]
  • Close tag [HH_DELIVERY]
  • Start tag [HH_DELIVERY_ITM]
  • Put value []
  • Close tag [HH_DELIVERY_ITM]
  • Start tag [CURRENCY]
  • Put value [EU2]
  • Close tag [CURRENCY]
  • Start tag [PRICE]
  • Put value [0.8000000]
  • Close tag [PRICE]
  • Start tag [REC_PRICE]
  • Put value [1.000]
  • Close tag [REC_PRICE]
  • Start tag [DIS1]
  • Put value [0.000]
  • Close tag [DIS1]
  • Start tag [DIS2]
  • Put value [0.000]
  • Close tag [DIS2]
  • Start tag [DIS3]
  • Put value []
  • Close tag [DIS3]
  • Start tag [DIS4]
  • Put value []
  • Close tag [DIS4]
  • Start tag [MARGIN]
  • Put value []
  • Close tag [MARGIN]
  • Close tag [ITDELIVERYCOND]
  • Start tag [CS_DEL_IT]
  • Start tag [HH_DELIVERY_ITM]
  • Put value []
  • Close tag [HH_DELIVERY_ITM]
  • Start tag [PLANT]
  • Put value [1100]
  • Close tag [PLANT]
  • Start tag [CHARG]
  • Put value [1159127001]
  • Close tag [CHARG]
  • Start tag [SPEC_RETURN]
  • Put value [0]
  • Close tag [SPEC_RETURN]
  • Start tag [DELVRY_DATE]
  • Put value [2017-02-20T11:15:33.0000000+01:00]
  • Close tag [DELVRY_DATE]
  • Start tag [TXT1]
  • Put value []
  • Close tag [TXT1]
  • Start tag [DATEORI]
  • Put value []
  • Close tag [DATEORI]
  • Close tag [CS_DEL_IT]
  • Close tag [CDELFU0]
  • Close tag [ns1:MT_ROUTEACCOUNT]
  • Close tag [ns0:Message1]
  • Start tag [ns0:Message2]
  • Close tag [ns0:Message2]
  • Close tag [ns0:Messages]
  • Document end
  • *** END APPLICATION TRACE ***
  • Java mapping com/sap/xi/tf/_MM_FSTR006_2_ROUTEACCOUNT_STORNO_ completed. (executeStep() of com.sap.xi.tf._MM_FSTR006_2_ROUTEACCOUNT_STORNO_).
  • Mapping step 1 has been executed.
  • Finished executing mapping sequence.

Execution of mapping on server took 236 milliseconds
Executed successfully

10:33:04 End of test

This test has been done with a message, that does not cause Message2 to be populated.

You may see below the payload used.

0
Former Member

Test payload:

http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">

4761231 Fontman XML Bridge FS_TR_006 2017-03-01T12:27:24.9567913+01:00 http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> 425585 1 5 1100 D03970531 2017-02-20T11:15:33.0000000+01:00 K116 0.800 0.080 0.000 0.880 0 0 0 101567 0 40578 1.000 KOS 0 0 10 1159127001 0.8000 0.000 0.000

This same payload is used also in the Integration directory test, but that one fails with:

<Trace levl="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>
<Trace level="2" type="T">......attachment XI_Context not found </Trace>
<Trace level="3" type="T">Mapping already defined in interface determination </Trace>
<Trace level="3" type="T">Object ID of Interface Mapping 13D79BD07F66369EB4573B97CD66CE25 </Trace>
<Trace level="3" type="T">Version ID of Interface Mapping 48D55B5093D711E29D73E0B4AC1E15DE </Trace>
<Trace level="1" type="T">Mapping-Object-Id:13D79BD07F66369EB4573B97CD66CE25 </Trace>
<Trace level="1" type="T">Mapping-SWCV:48D55B5093D711E29D73E0B4AC1E15DE </Trace>
<Trace level="1" type="T">Mapping-Step:1 </Trace>
<Trace level="1" type="T">Mapping-Type:XSLT </Trace>
<Trace level="1" type="T">Mapping-Program:FONTMAN_2_SAP </Trace>
<Trace level="1" type="T">Mapping-Step:2 </Trace>
<Trace level="1" type="T">Mapping-Type:JAVA </Trace>
<Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_MM_FSTR006_2_ROUTEACCOUNT_STORNO_ </Trace>
<Trace level="3" type="T">MTOM Attachments Are Written to the Payload </Trace>
<Trace level="3" type="T">Dynamic Configuration Is Empty </Trace>
<Trace level="3" type="T">Executing multi-mapping </Trace>
<Trace level="3" type="T">Creating mapping sequence with 2 steps. </Trace>
<Trace level="3" type="T">Creating step 0. </Trace>
<Trace level="3" type="T">Creating step 1. </Trace>
<Trace level="3" type="T">Start executing mapping sequence with 2 steps. </Trace>
<Trace level="3" type="T">Executing mapping step 0 </Trace>
<Trace level="2" type="T">Call XSLT processor with stylsheet FONTMAN_2_SAP.xsl. </Trace>
<Trace level="2" type="T">Returned form XSLT processor. </Trace>
<Trace level="3" type="T">XSLT transformation: FONTMAN_2_SAP.xsl completed with 0 warning(s). </Trace>
<Trace level="3" type="T">Mapping step 0 has been executed. </Trace>
<Trace level="3" type="T">Executing mapping step 1 </Trace>
<Trace level="2" type="T">Call method execute of the application Java mapping com.sap.xi.tf._MM_FSTR006_2_ROUTEACCOUNT_STORNO_ </Trace>
<Trace level="1" type="T"> *** START APPLICATION TRACE *** </Trace>
<Trace level="3" type="T">Document start </Trace>
<Trace level="3" type="T">Start tag [ns0:Messages] </Trace>
Add raw attribute [ xmlns:ns0=" http://sap.com/xi/XI/SplitAndMerge"]
<Trace level="3" type="T">Start tag [ns0:Message1] </Trace>
<Trace level="3" type="T">Start tag [ns1:MT_ROUTEACCOUNT] </Trace>
Add raw attribute [ xmlns:ns1="urn: lj-mlek.si:frontman"]
<Trace level="3" type="T">Start tag [ID] </Trace>
<Trace level="3" type="T">Put value [4761231] </Trace>
<Trace level="3" type="T">Close tag [ID] </Trace>
<Trace level="3" type="T">Start tag [INTERFACE] </Trace>
<Trace level="3" type="T">Put value [FS_TR_006] </Trace>
<Trace level="3" type="T">Close tag [INTERFACE] </Trace>
<Trace level="3" type="T">Start tag [CCUSVI0] </Trace>
<Trace level="3" type="T">Start tag [ISGENERALHD] </Trace>
<Trace level="3" type="T">Start tag [TOUR_ID] </Trace>
<Trace level="3" type="T">Put value [425585] </Trace>
<Trace level="3" type="T">Close tag [TOUR_ID] </Trace>
<Trace level="3" type="T">Start tag [MISSION_ID] </Trace>
<Trace level="3" type="T">Put value [1] </Trace>
<Trace level="3" type="T">Close tag [MISSION_ID] </Trace>
<Trace level="3" type="T">Close tag [ISGENERALHD] </Trace>
<Trace level="3" type="T">Start tag [ISCUSTOMERHD] </Trace>
<Trace level="3" type="T">Start tag [VISIT_ID] </Trace>
<Trace level="3" type="T">Put value [5] </Trace>
<Trace level="3" type="T">Close tag [VISIT_ID] </Trace>
<Trace level="3" type="T">Start tag [CUSTOMER] </Trace>
<Trace level="3" type="T">Put value [101567] </Trace>
<Trace level="3" type="T">Close tag [CUSTOMER] </Trace>
<Trace level="3" type="T">Start tag [CPD] </Trace>
<Trace level="3" type="T">Put value [0] </Trace>
<Trace level="3" type="T">Close tag [CPD] </Trace>
<Trace level="3" type="T">Close tag [ISCUSTOMERHD] </Trace>
<Trace level="3" type="T">Start tag [ISCUSTOMERADDR] </Trace>
<Trace level="3" type="T">Start tag [VISIT_ID] </Trace>
<Trace level="3" type="T">Put value [5] </Trace>
<Trace level="3" type="T">Close tag [VISIT_ID] </Trace>
<Trace level="3" type="T">Start tag [NAME1] </Trace>
<Trace level="3" type="T">Put value [] </Trace>
<Trace level="1" type="T"> *** TRACE TRUNCATED (for more details see Visual Administrator -> LogViewer)*** </Trace>
<Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
Unfortunately, when I go check in the NWA Log Viewer, I only see the "No data allowed here" error. Nothing, that would make more sense.
0
Raghuraman S Mar 01, 2017 at 03:39 PM
1

check whether you have removed split and merge namespace before testing.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi,

no, I haven't. The mapping creates the following output:

<?xml version="1.0" encoding="UTF-8"?> <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"> <ns0:Message1> <ns1:MT_ROUTEACCOUNT xmlns:ns1="urn:lj-mlek.si:fontman"> <ID>4761231</ID> <INTERFACE>FS_TR_006</INTERFACE> <CCUSVI0> <ISGENERALHD> <TOUR_ID>425585</TOUR_ID> <MISSION_ID>1</MISSION_ID> </ISGENERALHD> <ISCUSTOMERHD> <VISIT_ID>5</VISIT_ID> <CUSTOMER>101567</CUSTOMER> <CPD>0</CPD> </ISCUSTOMERHD> <ISCUSTOMERADDR> <VISIT_ID>5</VISIT_ID> <NAME1/> <CITY/> <POSTAL_CODE/> <STREET/> </ISCUSTOMERADDR> </CCUSVI0>          <CDELFU0> <ISGENERALHD> <TOUR_ID>425585</TOUR_ID> <MISSION_ID>1</MISSION_ID> </ISGENERALHD> <ISDELIVERYHD> <VISIT_ID>5</VISIT_ID> <HH_DELIVERY>D03970531</HH_DELIVERY> <TIMESTAMP>2017-02-20T11:15:33.0000000+01:00</TIMESTAMP> <TA_STATUS>2</TA_STATUS> <REASON>0</REASON> <STORNO>0</STORNO> </ISDELIVERYHD> <CS_DEL_HD> <BSTKD/> <BSTDK/> </CS_DEL_HD> <ISDELIVERYITM> <VISIT_ID>5</VISIT_ID> <HH_DELIVERY>D03970531</HH_DELIVERY> <HH_DELIVERY_ITM>10</HH_DELIVERY_ITM> <BE_DELIVERY_ITM>0</BE_DELIVERY_ITM> <MATERIAL>40578</MATERIAL> <QUANTITY>1.000</QUANTITY> <UOM>KOS</UOM> <TA_CODE>0</TA_CODE> <TA_STATUS>0</TA_STATUS> </ISDELIVERYITM> <ITDELIVERYCOND> <VISIT_ID>5</VISIT_ID> <HH_DELIVERY>D03970531</HH_DELIVERY> <HH_DELIVERY_ITM/> <CURRENCY>EU2</CURRENCY> <PRICE>0.8000000</PRICE> <REC_PRICE>1.000</REC_PRICE> <DIS1>0.000</DIS1> <DIS2>0.000</DIS2> <DIS3/> <DIS4/> <MARGIN/> </ITDELIVERYCOND> <CS_DEL_IT> <HH_DELIVERY_ITM/> <PLANT>1100</PLANT> <CHARG>1159127001</CHARG> <SPEC_RETURN>0</SPEC_RETURN> <DELVRY_DATE>2017-02-20T11:15:33.0000000+01:00</DELVRY_DATE> <TXT1/> <DATEORI/> </CS_DEL_IT> </CDELFU0> </ns1:MT_ROUTEACCOUNT> </ns0:Message1> <ns0:Message2/> </ns0:Messages>

It seems that my xml data gets parsed, when I submit it.

0
Former Member

I tried removing the headers and redundant xml tags from the beginning of message. Mapping works in OM test and it returns the desired data. But still, when I go test it in Integration Directory, I get the same "No data allowed here" response.

What bugs me most is the fact, that I can't see the full trace of mapping. It's truncated and I can't make sense from Java logs - they're rather useless, unless someone here has more experience with it.

0
avatar image
Former Member Mar 02, 2017 at 11:39 AM
1

Hi,

When you test in ID the following tag should not be there.

http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

...

</ns0:Message1> <ns0:Message2/> </ns0:Messages>

Please try.

Show 7 Share
10 |10000 characters needed characters left characters exceeded
Former Member

These tags appear as the OM executes. Since I am working on a multimapping solution, I think these tags should be a part of the message. I can not actually make the testing message without them, except if I modify the mapping to exclude multimapping, which is contrary to my requirement.

My current solution looks like this:

I have two distinct DT, which are used in two different MT. These are specified in a service interface (stateless, asynchronous), which is further used in message mapping. Occurence of messages is 1 for first and 0..1 for the second one. Basically, each input SOAP message creates message1 and only some of them create both message1 and message2.


0
Former Member
Former Member

the tag is compulsory @ OM and MM, but this will give you problem when u test it in ID.

1
Former Member
Former Member

Thank you for info. I will try to modify my mapping accordingly and remove this tag from my message.

I will post back the result.

0
Former Member

Hi

I have tried modifying the mapping as advised. Now I am getting another error, that is also pretty generic;

      
        
          
            
              
                
      
          Document start
        
        
          Start tag [ns0:Messages]
        
        
          Add raw attribute [ xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"]
        
        
          Start tag [ns0:Message1]         
      
    
                com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot 
                create target element 
                /ns0:Messages/ns0:Message1/ns1:MT_ROUTEACCOUNT. 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
              
            
          
        
      
    

This is my mapping currently:

screenshot1.png (54.9 kB)
0
Former Member

If it helps, below are a message, that fails and that is the message, that system passes to this MM during test:

<?xml version="1.0" encoding="utf-8"?>
<ns:MT_FSTR006 xmlns:ns="urn:lj-mlek.si:frontman">
   <ID>4761231</ID>
   <INTERFACE>FS_TR_006</INTERFACE>
   <DOC_COLLECTION>
      <DOC>
         <SHIPPMENT_ID>425585</SHIPPMENT_ID>
         <MISSION_ID>1</MISSION_ID>
         <VISIT_ID>5</VISIT_ID>
         <PLANT_ID>1100</PLANT_ID>
         <DOC_ID>D03970531</DOC_ID>
         <DCREATE>2017-02-20T11:15:33.0000000+01:00</DCREATE>
         <PARENT_DOC_ID/>
         <PARENT_DCREATE/>
         <AGENT_ID>K116</AGENT_ID>
         <PAYTYPE_ID/>
         <SUM_VAL>0.800</SUM_VAL>
         <TAX_SUM>0.080</TAX_SUM>
         <DISCOUNT_VAL>0.000</DISCOUNT_VAL>
         <PAY_VAL>0.880</PAY_VAL>
         <STORNO>0</STORNO>
         <RETURN>0</RETURN>
         <GRATIS>0</GRATIS>
         <LOC_ID>101567</LOC_ID>
         <OTC>0</OTC>
         <LOC_NAME/>
         <CITY/>
         <ZIP/>
         <ADDRESS/>
         <PARENT_NOTE_NO/>
         <DOC_PRODUCTS_COLLECTION>
            <DOC_PRODUCTS>
               <PROD_ID>40578</PROD_ID>
               <QTY_MAP/>
               <QTY>1.000</QTY>
               <UNITS>KOS</UNITS>
               <SAP_STATUS>0</SAP_STATUS>
               <SAP_SEQUENCE>0</SAP_SEQUENCE>
               <SEQUENCE>10</SEQUENCE>
               <SERIAL_ID>1159127001</SERIAL_ID>
               <PRICE>0.8000</PRICE>
               <REC_PRICE/>
               <DIS1>0.000</DIS1>
               <DIS2>0.000</DIS2>
               <DIS3/>
               <DIS4/>
               <MARGIN/>
               <TXT1/>
               <DATEORI/>
            </DOC_PRODUCTS>
         </DOC_PRODUCTS_COLLECTION>
      </DOC>
   </DOC_COLLECTION>
</ns:MT_FSTR006>

Below is the message, that this MM expects, when I enter the testing tab:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
   <ns0:Message1>
      <ns1:MT_FSTR006 xmlns:ns1="urn:lj-mlek.si:frontman">
         <ID/>
         <INTERFACE/>
         <DOC_COLLECTION>
            <DOC>
               <SHIPPMENT_ID/>
               <MISSION_ID/>
               <VISIT_ID/>
               <PLANT_ID/>
               <DOC_ID/>
               <DCREATE/>
               <PARENT_DOC_ID/>
               <PARENT_DCREATE/>
               <AGENT_ID/>
               <PAYTYPE_ID/>
               <SUM_VAL/>
               <TAX_SUM/>
               <DISCOUNT_VAL/>
               <PAY_VAL/>
               <REQ_DATE/>
               <STORNO/>
               <PARENT_NOTE_NO/>
               <RETURN/>
               <GRATIS/>
               <LOC_ID/>
               <OTC/>
               <LOC_NAME/>
               <CITY/>
               <ZIP/>
               <ADDRESS/>
               <DOC_PRODUCTS_COLLECTION>
                  <DOC_PRODUCTS>
                     <PROD_ID/>
                     <QTY_MAP/>
                     <QTY/>
                     <UNITS/>
                     <CHARG/>
                     <SAP_STATUS/>
                     <SAP_SEQUENCE/>
                     <SEQUENCE/>
                     <SERIAL_ID/>
                     <REASON_ID/>
                     <PRICE/>
                     <REC_PRICE/>
                     <DIS1/>
                     <DIS2/>
                     <DIS3/>
                     <DIS4/>
                     <MARGIN/>
                     <TXT1/>
                     <DATEORI/>
                  </DOC_PRODUCTS>
               </DOC_PRODUCTS_COLLECTION>
            </DOC>
         </DOC_COLLECTION>
      </ns1:MT_FSTR006>
   </ns0:Message1>
</ns0:Messages>

0
Former Member

Hi,

Please revert your changes on MM, since it's already working please do not touch them.

MM with multiple occurrences would always generate messages with splilt&Merge namespace, that is the default behaviour when you change the occurrence in the signature tab from 1:1 to 1:unbounded or so.

In your MM testing, you should copy only the message, in my case, from <ZDELVRY03EXT> onwards till the end and paste between the <Message1> </Message1> tag.

But when you test in ID, you do not need to include the <message><message1> tag. This should be the source message from sender @ it's original state without any transformation being done yet

Hope this is clear for you now =)

ysplitnmerge.jpg (45.9 kB)
ysignature.jpg (47.9 kB)
yid.jpg (80.6 kB)
0
Former Member

Hi

Thank you for your suggestion, I've gone back to the working MM and things are much clear to me now, regarding multimapping and Split&Merge namespace. For testing the MM I use just the message part without message tags and it works correctly.

In my ID testing however, I use the whole message from the sender, like I have also done before. Unfortunately, I am still getting the following in the ID interface and the NWA Log Viewer:

It looks to me, like I perhaps have something wrong in my mapping, that prevents the Interface determination from working.

I am using a single Service interface with two operations; each with a different message type and occurence frequency; the first is always 1, while second is optional, 0..1.

0
avatar image
Former Member Mar 07, 2017 at 01:40 PM
0

I have done some additional testing and I get the same error in two cases;

1. when doing the testing in Operation Mapping and I test both mapping operations at once. If I run step one first and then copy/paste the result into second part, omitting the Split&Merge tags it runs ok.

2. when testing in Integration Directory - the entire scenario.

The first mapping operation, that I perform is an XSLT transform, that changes the incoming XML message to conform to my requirements. The second mapping is the one performing the actual multi mapping.

Could the problem be in the use of XSLT transform? It is very basic, just reformatting and dropping the header.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 07, 2017 at 03:15 PM
0

Hi Demsar,

Could you please let me know what is the input and output data that you are posting to the interface while testing end to end scenario and also the XSD of the same.

Regards,

Avinash.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Sure, here is the:

Input message for the end-to-end test

<?xml version="1.0" encoding="utf-8"?>
<MESSAGE xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <HEADER>
    <MESSAGE_ID>5743289</MESSAGE_ID>
    <FROM>Fontman XML Bridge</FROM>
    <TO>FS_TR_006</TO>
    <DATE>2017-03-06T14:15:09.6384474+01:00</DATE>
  </HEADER>
  <BODY>
    <FS_TR_006 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DOC_COLLECTION>
        <DOC>
          <SHIPPMENT_ID>500638</SHIPPMENT_ID>
          <MISSION_ID>1</MISSION_ID>
          <VISIT_ID>35</VISIT_ID>
          <PLANT_ID>1100</PLANT_ID>
          <DOC_ID>D04753308</DOC_ID>
          <DCREATE>2017-03-06T12:16:59.0000000+01:00</DCREATE>
          <PARENT_DOC_ID />
          <PARENT_DCREATE />
          <AGENT_ID>K140</AGENT_ID>
          <PAYTYPE_ID>D000</PAYTYPE_ID>
          <SUM_VAL>21.820</SUM_VAL>
          <TAX_SUM>2.070</TAX_SUM>
          <DISCOUNT_VAL>0.000</DISCOUNT_VAL>
          <PAY_VAL>23.890</PAY_VAL>
          <STORNO>0</STORNO>
          <RETURN>0</RETURN>
          <GRATIS>0</GRATIS>
          <LOC_ID>200215</LOC_ID>
          <OTC>1</OTC>
          <LOC_NAME />
          <CITY />
          <ZIP />
          <ADDRESS>500638</ADDRESS>
          <PARENT_NOTE_NO />
          <DOC_PRODUCTS_COLLECTION>
            <DOC_PRODUCTS>
              <PROD_ID>102325</PROD_ID>
              <QTY_MAP />
              <QTY>4.828</QTY>
              <UNITS>KG</UNITS>
              <SAP_STATUS>0</SAP_STATUS>
              <SAP_SEQUENCE>0</SAP_SEQUENCE>
              <SEQUENCE>10</SEQUENCE>
              <SERIAL_ID>02062017</SERIAL_ID>
              <PRICE>4.5200</PRICE>
              <REC_PRICE />
              <DIS1>0.000</DIS1>
              <DIS2>0.000</DIS2>
              <DIS3 />
              <DIS4 />
              <MARGIN />
              <TXT1 />
              <DATEORI />
            </DOC_PRODUCTS>
          </DOC_PRODUCTS_COLLECTION>
        </DOC>
      </DOC_COLLECTION>
    </FS_TR_006>
  </BODY>
</MESSAGE>


Below is the code of the first mapping in the Operation mapping:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
				xmlns:ns="urn:my_url:fontman"
				exclude-result-prefixes="xsl ns">
	<!--xsl:output method="xml" encoding="UTF-8"/-->
	<xsl:variable name="separator" select="', '"/>
	<xsl:variable name="emptyspace" select="' '"/>
	<xsl:variable name="sl" select="'SL'"/>
	<xsl:variable name="shema" select="'http://www.wbf.org/xml/b2mml-v02 C:\interface\SMP001.xsd'"/>


	<xsl:decimal-format name="decf" 
						decimal-separator="," 
						grouping-separator="." 
						minus-sign="-" 
						NaN="0" 
						percent="%"/>


	<xsl:template name="zeroLeadTrim">
        <xsl:param name="stringValue" />
        <xsl:param name="lengthValue" />
			<xsl:choose>
				<xsl:when test="string-length($stringValue) > $lengthValue"><xsl:value-of select="substring($stringValue, string-length($stringValue)-$lengthValue, string-length($stringValue))" /></xsl:when>
				<xsl:otherwise><xsl:value-of select="$stringValue" /></xsl:otherwise>
			</xsl:choose>
	</xsl:template>
	
	<xsl:template match="/MESSAGE">
		<xsl:apply-templates select="./HEADER"/>
	</xsl:template>
		
	<xsl:template match="HEADER">
		<xsl:variable name="tag"><xsl:text>MT_</xsl:text><xsl:value-of select='translate(TO,"_",string(""))'/></xsl:variable>
		<xsl:element  name="ns:{$tag}" namespace="urn:my_url:fontman">
			<ID><xsl:value-of select="MESSAGE_ID"/></ID>
			<INTERFACE><xsl:value-of select="TO"/></INTERFACE>		
			<xsl:apply-templates select="//BODY"/>
		</xsl:element>
	</xsl:template>


	<xsl:template match="BODY">
		<xsl:copy-of select = "child::node()/child::node()"/>
	</xsl:template>


</xsl:stylesheet>

Below is the code of the second operation (graphical mapping) in Operation mapping. It's in a second post, since it's too long for a single one.

0
Former Member
mapping.txt (24.9 kB)
0