cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Proxy error in Message Mapping

Former Member
0 Kudos

Hello,

We are getting an error in sxi_monitor, for message mapping, the error is stated below, is the xml from error.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!--  Request Message Mapping -->

- <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

  <SAP:Category>Application</SAP:Category>

  <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

  <SAP:P1>com/sap/xi/tf/_MM_PURCHASEREQUISITIONFromSAP_to_E~</SAP:P1>

  <SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>

  <SAP:P3>on: Cannot create target element /ns1:createRfx/rf</SAP:P3>

  <SAP:P4>x/AttachmentHeader. Values missing in queue conte~</SAP:P4>

  <SAP:AdditionalText />

  <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_PURCHASEREQUISITIONFromSAP_to_E~; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns1:createRfx/rfx/AttachmentHeader. Values missing in queue conte~</SAP:Stack>

  <SAP:Retry>M</SAP:Retry>

  </SAP:Error>

When i copy the payload and try a test for message mapping in ESR, i get the error mentioned below

The processing instruction target matching "[xX][mM][lL]" is not allowed.

The processing instruction target matching "[xX][mM][lL]" is not allowed. com.sap.aii.utilxi.misc.api.BaseRuntimeException: The processing instruction target matching "[xX][mM][lL]" is not allowed. at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:264) at com.sap.aii.mappingtool.tf7.rt.xparser.XParser.run(XParser.java:81) Caused by: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438) at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:689) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:750) at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:664) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:845) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:261) ... 1 more Root Cause: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438) at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:689) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:750) at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:664) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:845) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:261) at com.sap.aii.mappingtool.tf7.rt.xparser.XParser.run(XParser.java:81) The processing instruction target matching "[xX][mM][lL]" is not allowed.

Any help would be appreciated.

Regards,

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

It's hard to express than fix this.  Copy you xml data from abap proxy program and use it in the ESR mapping test tool. This problem is due to few things. Check all the mandatory fields and node occurences(1 to many) and see whether the source data is sufficient to fill up the target mandatory fields and its node requirement. You might want to test from the top node to the bottom of the target structure. Use queue mode and check the data flow from source to target.

If you have invalid  xml structure import it in the XMLSPY or some xml validator tool and find the reasons for the error.

Answers (8)

Answers (8)

Former Member
0 Kudos

Hello,

Thank you to all, the actual issue was, the logic in the mapping had to be changed, if there are no attachments for a item, the necessary node will not have data in it.

So we changed the mapping, if Header attachment is blank send a constant, else it will have data.

and change the occurrence from 1:1 to 0:unbounded.

Thank you all for your valuable inputs.

Regards,

Abhishek

former_member184681
Active Contributor
0 Kudos

Hi Abhishek,

The error description is pretty precise here: Cannot create target element /ns1:createRfx/rfx/AttachmentHeader. Values missing in queue. So simply what you have to do is to check the mapping for that particular field - it appears to be mandatory, but gets no value during the mapping of that one particular message. So first go to moni and take the payload of the message that caused the error, then go to ESR and test your message mapping on that particular payload. The best approach would be to right-click on each step of the mapping for this AttachmentHeader field, step by step, to find the error, and correct it directly there.

Hope this helps,
Greg

former_member192238
Participant
0 Kudos

Hi,

Data is not populating for mandatory field in the target structure simply copy the payload from SXMB_MONI in PI and paste the same in Test tab of  Message mapping in ESR.

Regards

Praveen

Former Member
0 Kudos

hi Abhishek,

When i copy the payload and try a test for message mapping in ESR, i get the error mentioned below

The processing instruction target matching "[xX][mM][lL]" is not allowed.

The processing instruction target matching "[xX][mM][lL]" is not allowed.

This would be coming because of the incorrect XML structure like mutiple headers <?xml version="1.0" encoding="UTF-8"?> or some inconsistency in XML structure throws this error. Please check the XML strucuture and try executing the mapping again.

Former Member
0 Kudos

hello,

I do understand this is a mapping error, what i need to know is how do i rectify the error.

As when i do a test mapping in ESR, i do not get any error. but when i trigger this is from my ABAP Proxy program, i do get the above mentioned error.

Regards.

Abhishek

gagandeep_batra
Active Contributor
0 Kudos

Hi

this error seems to be a mapping error

>>>cannot create target element /ns1:createRfx/rfx/AttachmentHeader. Values missing in queue conte~</SAP:Stack>

this means there is a target field "AttachmentHeader" is not created

check that field is mapped with which field. and check that source field value in payload

Regards

Gagandeep


aashish_sinha
Active Contributor
0 Kudos

Hi,

There is a problem in your message mapping. Paste your source message into the source field of test tab in message mapping and test it for the data. You will get same error.

Then rectify it.

Regards

Aashish Sinha

Former Member
0 Kudos

Hello,

How do i rectify the same.

Regards,

Abhishek

Former Member
0 Kudos

That is not the proxy error but message mapping error.

rajasekhar_reddy14
Active Contributor
0 Kudos

take source payload from MONI and test your message mapping in ESR and debug the mapping.

Former Member
0 Kudos

Hello,

I'm new to PI, how do i debug mappping in ESR.

Regards,

Abhishek

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Are you using reading attachments using message mapping? If yes, then you should check first in your UDF if there are attachments by using the areAttachmentsAvailable() method. Also, do not forget to check the read attachments option in your operation mapping.

Hope this helps,

Mark

Former Member
0 Kudos

Hello,

We are using the attachment from ECC side, we are not using UDF. We have our ABAP logic written on ECC side, in which we are converting the image in binary and attaching the to a field in the DT for base-64.

Regards,

Abhishek