When to use XML Receive and XML Write

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

Viewing 1 reply thread
  • Author
    Posts
    • #22513

      Hello!

      In the Receive pipeline there is a alternative called XML Receive.
      I just wonder when do I use this alternative.

      In the Send pipeline there is a alternative called XML Write.
      I just wonder when do I use this alternative.

      So as a summary I can’t understand when to use this XML Receive and XML
      Write on the pipeline

      //Tony

    • #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

      • #22519

        Custom pipelines can be overkill  as per instance configuration allows you to change the pipeline component properties without rebuilding your application. Although this is not available with Biztalk 2004.

        In fact I usually build a project with a Flat File Receive pipeline and Flat File Send pipeline and deploy these in a common application that can be shared. When needed I use my standard FF Receive pipeline and specify the DocumentSpec via the Admin Console.

        The Xml Receive pipeline contains the Xml Disassebler. This identifies the message type, using root node name and namespace from the incoming message and matches this to a deployed schema. If the schema is an envelope it will debatch the message and propagate the child messages. It uses the schema to determine which properties to promote and distinguished fields to write to the message context. it can also validate the message against the schema if you turn this option on.

        The XmlTransmit pipeline contains the Xml Assembler. This is required if you are using envelopes and need to wrap a message in an envelope. You can’t aggregate child messages into an envelope, only a single message so this function is not used much.
        You also need the XmlTransmit pipeline if you wish to demote property values back into the message you are sending.
        You can also mess around with processing instructions in the Xml document, – you might need this with InfoPath forms which rely on processing instructions.

           

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.