Problem with Edifact Interchange and loopback adapter Receive Pipeline – Received unexpected message type

  • Sandro Pereira
  • Jul 24, 2009
  • 2 min read

In a previous project, I worked with EDI messages to interchange with partners, but before I sent the message to the partner, I needed to pass it through a loopback adaptor, which was configured with the EDISend pipeline and the EDIReceive Pipeline.

📝 One-Minute Brief

When using a loopback adapter with EDIFACT messages to retrieve party properties, you may encounter an UnexpectedMessageTypeException. This occurs when the Receive Pipeline expects an EdifactInterchangeXml type but receives a specific transaction type instead. The solution is to configure the EDI Disassembler component in your receive pipeline by setting the PreserveInterchange property to True.

The objective is to get some properties configured in the Party so that I can proceed with the orchestration.

The send work well and creates a correct EDI message, but on the receive, I was expecting an EDI Interchange Message. I received back the message it gave me the following error:

“… Exception thrown from: segment -1, progress -1

Inner exception: Received unexpected message type ‘http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006#EFACT_D01B_INVOIC_EAN010’ does not match expected type ‘http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006/InterchangeXML#EdifactInterchangeXml’.

Exception type: UnexpectedMessageTypeException

Source: Microsoft.XLANGs.Engine …”

Solution

You have to configure the EDI pipeline to preserve the interchange.

In EDI Pipeline configuration:

  • On the EDI disassembler component
    • Set the PreserveInterchange property to True.
EDI Pipeline proterties
  • Rebuild and redeploy your solution.
Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

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

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top