Scott Woodgate's OutBursts

"Untyped" receive ports in BizTalk Server 2004

Its not an uncommon request (in fact I got one in email today) to want to receive:

1. Non-XML data in a receive-port

2. XML messages of differing XML schemas within a single receive port

So how do you do that with BizTalk Server?

1. Set the messagetype property on your receive port to System.xml.xmldocument (yes I know in case 1 you are receiving non-XML data, but do it anyways)

2. Set-up a filter on the receive shape in orchestration which will pickup the message. Make sure you set your filter appropriately so you don't pick-up all documents.

To access the data as a stream (if you want) then you can use this in an expression shape: 

XLANGPart.RetrieveAs( typeof(Stream) )

Credits to Yossi

Published Wednesday, June 02, 2004 3:47 PM by scottwoo

Comments

 

Jason Welty said:

Glad to see this posted.. very helpful, thanks.
Also, for related issue search for thread titled 'Distribution in BTS 2004' on bt newsgroup at http://www.microsoft.com/biztalk/community

this describes how to load a message if you only know a filename from within an orchestration, and can be ported to load any stream.
June 5, 2004 9:38 PM
 

Mark said:

I assume this means that you can't use promoted properties?
June 24, 2004 3:52 AM
 

Roland Jaeger said:

Thanks for that hint! I was looking for this for a long time.
However, I can't get it working with a Web Service port while using the XML Reveive Pipeline. My intention was to use the pipeline to disassemble the message to get the namespace (message id) and then put it into the appropriate orchestration by filtering for the message id. When using a normal file port, this works fine. The message is decoded and the orchestration with the correct filter picks up the message.
However, when I switch to a web service port (request-response with string type response) I get a pipeline exception: 'Document type "order" does not match any of the given schemas'. I'm still submitting the same message (in a soap envelope of course) and the schema is still deployed.
Switching to a pass through pipeline solves the problem but since the message id cannot be found I end up with a routing error.
Strangely, if I remove the schema with the namespace "order" from my schema assembly, the error is also solved (with the XML pipeline activated) and the message is correctly delivered to the orchestration. But since my mappings expect a schema with a different namespace now, all mappings fail...

Thanks for your support,
Roland
June 29, 2004 4:47 AM
 

Patrick Wellink said:

Hello maybe you can help,

i need to access the stream in the orchestration.

in the post it is stated that :

To access the data as a stream (if you want) then you can use this in an expression shape:

XLANGPart.RetrieveAs( typeof(Stream) )

But i can't do that. Do i have to create a reference somewhere to do this.

July 1, 2004 3:21 AM
 

Stephen W. Thomas said:

August 10, 2004 7:20 PM
 

Stephen W. Thomas said:

August 22, 2004 12:49 PM
 

Stephen W. Thomas said:

October 9, 2004 6:42 PM
 

Stephen W. Thomas said:

July 5, 2005 10:01 AM
 

Stephen W. Thomas BizTalk MVP said:

Scott posted a message back in June about untyped receive ports inside on Orchestration. Untyped Messages
August 23, 2006 3:26 AM
 

Master orchestration | keyongtech said:

January 22, 2009 1:00 AM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker