IBM Support

Failure Parsing Inbound Synchronous AS2 MDN

Troubleshooting


Problem

When receiving an inbound AS2 synchronous MDN, the EDIINTPipelineParse service fails with error: "Parsing failure on message"

Symptom

The AS2 outbound BP fails at the EDIINTPipelineParse service step with error: "Parsing failure on message"

The EDIINT log shows error like below:

[2017-03-14 15:28:00.392] ERROR Exception caught in MIMEParser.LoadFromByteArray
[2017-03-14 15:28:00.392] ERROR [1489501680392] String index out of range: 0
[2017-03-14 15:28:00.392] ERRORDTL [1489501680392]java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.StringBuffer.charAt(StringBuffer.java:248)

[2017-03-14 15:28:00.392] DEBUG MIMEParser: Load of message from stream finished with return code -1
[2017-03-14 15:28:00.392] ERROR EDIINTPipelineService: Error: Message is unparseable
[2017-03-14 15:28:00.393] ERROR Exception Parsing failure on message
[2017-03-14 15:28:00.393] ERROR [1489501680393] Parsing failure on message
[2017-03-14 15:28:00.393] ERRORDTL [1489501680393]java.lang.Exception: Parsing failure on message
at com.sterlingcommerce.woodstock.services.EDIINT.EDIINTPipelineService.EDIINTPipelineServiceImpl.UnpackageMessageFromWFC(EDIINTPipelineServiceImpl.java:1587)

[2017-03-14 15:28:00.393] DEBUG EDIINTPipelineService: Unpackaging finished with RC false
[2017-03-14 15:28:00.393] ERROR EDIINTPipelineService.parseMessage(): Caught exception Parsing failure on message
[2017-03-14 15:28:00.393] ERROR [1489501680393] Parsing failure on message
[2017-03-14 15:28:00.393] ERRORDTL [1489501680393]java.lang.Exception: Parsing failure on message
at com.sterlingcommerce.woodstock.services.EDIINT.EDIINTPipelineService.EDIINTPipelineServiceImpl.UnpackageMessageFromWFC(EDIINTPipelineServiceImpl.java:1587)


[2017-03-14 15:28:00.393] DEBUG EDIINTPipelineService: needsHTTPResponse = false HTTPResponseSent false
[2017-03-14 15:28:00.395] ERROR EDIINTPipelineService: Caught exception Parsing failure on message
[2017-03-14 15:28:00.395] ERROR [1489501680395] Parsing failure on message
[2017-03-14 15:28:00.395] ERRORDTL [1489501680395]java.lang.Exception: Parsing failure on message
at com.sterlingcommerce.woodstock.services.EDIINT.EDIINTPipelineService.EDIINTPipelineServiceImpl.UnpackageMessageFromWFC(EDIINTPipelineServiceImpl.java:1587)

[2017-03-14 15:28:00.395] ERROR 000000000000 GLOBAL_SCOPE EDIINTPipelineService: Caught exception Parsing failure on message
java.lang.Exception: Parsing failure on message
at com.sterlingcommerce.woodstock.services.EDIINT.EDIINTPipelineService.EDIINTPipelineServiceImpl.UnpackageMessageFromWFC(EDIINTPipelineServiceImpl.java:1587)


Cause

IBM Sterling B2B Integrator is compliant with AS2 RFC as outlined in: https://www.ietf.org/rfc/rfc4130.txt

Non-compliant headers were received in the inbound MDN message.

Diagnosing The Problem

Check the MDN received by viewing the Primary Document at the EDIINTPipelineParse service in error, verify that it contains an header like below:

X-Content-Type-Options: nosniff

Resolving The Problem

Solution: Request your trading partner to stop sending the X-Content-Type-Options header or any other non-compliant headers in the AS2 MDN.

Workaround: You could edit the BP that sends out the AS2 message and just prior to the EDIINTPipelineParse service that will parse the returned MDN, insert an instance of the Document Keyword replace service like below to remove the X-Content-Type-Options header from the MDN before it is parsed.

<operation name="Document Keyword Replace">
<participant name="SyncEngine_DocKeywordReplace"/>
<output message="DocKeywordReplaceInputMessage">
<assign to="literal_mode">true</assign>
<assign to="keyword1" from="string('X-Content-Type-Options: nosniff')"></assign>
<assign to="replace1" from="string('')"></assign>
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>

[{"Product":{"code":"SS3JSW","label":"IBM Sterling B2B Integrator"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Adapters","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF014","label":"iOS"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"5.2;5.2.1;5.2.2;5.2.3;5.2.4;5.2.5;5.2.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
11 February 2020

UID

swg22000405