tags:

views:

548

answers:

2

I have read somewhere that I better use multi-part types on receive and send ports, but can't understand one thing. If I receive some XML data through say HTTP port how do I put it in right path in the message. Should I create custom pipeline for this or there is something else (I'm new to BizTalk)?

+1  A: 

There's really no hard and fast rule about using multi-part message types for something like this; it really depends a lot on your scenario.

However, I'd like to point out that, underneath, all messages in BizTalk are, at the lowest level, multi-part messages. The question is whether accessing those extra parts (if they are present) is easy in an orchestration or not ;)

That said, let me point out that, in many cases, there's little reason to use multi-part message types in orchestrations. For example, the HTTP or FILE adapters will never generate a message with multiple parts on their own, unless perhaps you've got something like the SMIME decoding component on your receive pipeline.

Some other adapters do definitely take advantage of multi-part message types, like perhaps the POP adapter (attachments) or the SOAP adapter. But unless you've got an scenario like this, that really requires multi-part message types, I see little reason why you'd start with those.

tomasr
The reasoning behind using multi-part messages in ports was that you could easily switching message parts without having to unlink ports with shape parts
Sergej Andrejev
+2  A: 

Sergej, You must have picked up this concept half baked from the article 8 Tips and Tricks for BizTalk Programming (http://msdn.microsoft.com/en-us/magazine/cc163423.aspx)

As explained in the article, it makes more sense to create Multi-Part messages inside the orchestrations, so when you want to change something in the schema its easy to do so without deleting all the links between the ports and send/receive shapes.

Assigning a message to a specific part (normally the first part) should not be a big issue within the orchestration, you should be able to do it via maps or within the message assignment shape.

HTH

Saravana Kumar
Does that mean that I misunderstood the suggestion? Should I use schema in port but create multi-type message right after that
Sergej Andrejev