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?
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.
Hi,
below is the log of the operation mapping test:
10:33:04 Start of test
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.
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.000This 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>check whether you have removed split and merge namespace before testing.
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.
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.
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.
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.
the tag is compulsory @ OM and MM, but this will give you problem when u test it in ID.
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.
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:
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>
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.
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 =)
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.
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.
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.
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.