Sergej Andrejev
Sergej Andrejev

Reputation: 9403

Creating multi-part messages from single-part messages in custom pipeline (BizTalk)

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)?

Upvotes: 1

Views: 3684

Answers (2)

Saravana Kumar
Saravana Kumar

Reputation: 596

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

Upvotes: 3

tomasr
tomasr

Reputation: 13849

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.

Upvotes: 1

Related Questions