Re: When to use XML Receive and XML Write

Home Page Forums BizTalk 2004 – BizTalk 2010 When to use XML Receive and XML Write Re: When to use XML Receive and XML Write

#22517

Hi Tony!

For starters, when you say “Xml Write” I’m going to assume you mean Xml Transmit.

– When you receive an Xml message you usually want to validate the message against a schema and let the pipeline set context properties like “MessageType” for subscriptions, when you use passthrough this will not happen.

– But when it comes to flat-files you’ll create your own pipeline, why not in the Xml-case?

– You can (and maybe should) create custom pipelines for xml-messages as well, but you really don’t need to. You see, xml-messages have means of identification (namespace and root-node name) that tells BizTalk what schema (of all the deployed ones) to use for validation. So BizTalk is able to figure this out by itself. Most of the times at least. If you have more than one schema deployed with the same root-name and namespace, BizTalk will get confused and not know which one to use for validation and parsing. Here you either want to set the “DocumentSpecNames”-property of the Default Xml Receive/Transmit pipeline or to create your own custom pipeline to do the (dis-)assembler and validation against your specified schema.

Custom pipelines should allways be considered, though not allways needed. For example, you don’t know when another developer, creating an entirely new solution on “your” BizTalk server decides to deploy a new schema that happens to have the same root-node and namespace as one of your schemas, causing – maybe two years after its release – your solution to stop functioning.

Sorry for the long post. Hope I was clear enough. 🙂

//Niklas Häggström – Connecta AB, Stockholm, Sweden