IDOC_ERROR_PARSE_FAILURE: Namespace in IDOCs

IDOC_ERROR_PARSE_FAILURE: Namespace in IDOCs

Scenario:

In a SOAP to IDOC scenario with a XSLT mapping, the receiving IDOC Communication Channel produced an error message.

Error:

The following error message is shown in the Message Log:

Error before sending due to idoc parsing error: (7) IDOC_ERROR_PARSE_FAILURE: Invalid XML 1.0 character encountered within IDoc-XML for type <ORDERS05>:
state=EXPECTING_IMMEDIATE_TAG_END, charPosition=64, lineNumber=1, columnNumber=65, invalidChar=U+0078,
sourceSnippet=…UTF-8″ standalone=”no”?><ORDERS05 xmlns:a=”http://example.namespace.com/order”><IDOC BEGIN=”1″><EDI_DC40 SEGMENT=”1…
—————————————————^

Error Message in PIMON Message Monitor
Error Message in PIMON Message Monitor

Solution:

Namespaces are not allowed in IDOCs. You can add the exclude-result-prefixes parameter to your stylesheet definition to make sure that the given namespaces are not added to the target document.

<ns0:stylesheet version="1.0" xmlns:a="http://example.namespace.com/order" xmlns:ns0="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="a">

Multiple namespaces can be added by using a white space as separator:

<ns0:stylesheet version="1.0" xmlns:a="http://example.namespace.com/order" xmlns:ns0="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="a b c">

Leave a Reply

Your email address will not be published. Required fields are marked *