Search code examples
c#xmlbiztalkbiztalk-2013

Receive different type of XML request in a orchestration


I have a Biztalk which had issues with handling large XML message requests. So I have planned to use a custom pipeline component which saves the message to a temporary directory if the request is more than some specified size, then it creates a small XML which contains path to this temporary large file. If message is small then it sends as it is received.( https://www.codeproject.com/Articles/180216/Transfer-Large-Files-using-BizTalk-Receive-Side)

But the problem I am facing now is how to receive this two different schema XML in the orchestration. In my existing orchestration I used to recive XML with specific schema only as I always wanted to get request of specific type. But now I receive XML of two different types. One is the the request XML I receive when size of request is small. One more is the small XML with large file path I receive from pipeline when file size is large.

I tried setting the message type in the recieve side of orchestration to system.xml.xmldocument so that it can receive any type of XML instead of XML with specific schema. It looks to solve the issue but I think this is not ideal solution as it can receive any type of XML request. So I need good approaches to solve the issue mentioned above.


Solution

  • Start with a Listen Shape in your orchestration. Then for each message type, place a receive shape (with Activate = true) in a separate branch of the listen shape.