/scripts/ahub.form.attachments.js
0

XML TO IDOC (invoic) Namespace and xml errors in Mesmon

Dec 15, 2016 at 02:39 PM

227

avatar image

z371invoicez371invoice01z-copy.txtScenario:

XML source file, mapped to a idoc, of invoic idoc type which has been modified to include additional fields (address). So i've imported the idoc, exported its XSD

to the desktop to add the maxOccurences="unbounded" to the Idoc header to allow multiple idocs to be created SAP side (as there are multiple in the source xml).

I've mapped it. But now get the below error in Mesmon when trying to pass the XML.

using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.adapter.xi.routing.RoutingException: com.sap.aii.utilxi.xmlvalidation.impl.XMLValidationException: XML Validation for payload with root element name Z371INVOICE.Z371INVOICE01 , target namespace urn:sap-com:document:sap:idoc:messages Failed!Errors Encountered During Parsing 1.cvc-complex-type.2.4.d: Invalid content was found starting with element IDOC. No child element is expected at this point. " id="CEPJICNK.MsgDetailedView.TextKey_editor.14" style="white-space: normal;" ti="0" ct="TV" lsdata="{0:'Transmitting the message to endpoint using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.adapter.xi.routing.RoutingException: com.sap.aii.utilxi.xmlvalidation.impl.XMLValidationException: XML Validation for payload with root element name Z371INVOICE.Z371INVOICE01 , target namespace urn:sap-com:document:sap:idoc:messages Failed!Errors Encountered During Parsing \n1.cvc-complex-type.2.4.d: Invalid content was found starting with element IDOC. No child element is expected at this point.\n',9:true}" bresettabindex="true">Transmitting the message to endpoint using connection File_http:// sap.com/xi/XI/System failed, due to: com.sap.aii.adapter.xi.routing.RoutingException: com.sap.aii.utilxi.xmlvalidation.impl.XMLValidationException: XML Validation for payload with root element name Z371INVOICE.Z371INVOICE01 , target namespace urn:sap-com:document:sap:idoc:messages Failed!Errors Encountered During Parsing
1.cvc-complex-type.2.4.d: Invalid content was found starting with element IDOC. No child element is expected at this point.


I cant say I've seen this error before but, theres two errors that I can see; 1) the namespace needs correcting in the XSD 2) the xsd has an error in it at the element IDOC .


Would I set the namespace as the NS that the external definition is located in ?

Not sure where the child element is located.

Please advise.


XSD is attached as a xml as a .txt file

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

1 Answer

Manoj K Dec 15, 2016 at 05:24 PM
0

You really don't need to change the occurrence you can use the signature tab of the MM to change the occurrence of IDOC directly.

https://blogs.sap.com/2016/03/29/stop-using-external-definition-for-1-n-idoc-multi-mapping/

Br,

Manoj

Share
10 |10000 characters needed characters left characters exceeded
Skip to Content