Xpath in Biztalk

Home Page Forums BizTalk 2004 – BizTalk 2010 Xpath in Biztalk

Viewing 2 reply threads
  • Author
    Posts
    • #20865

      My orchestration has to pick up an XML Document that is placed in the File location. It is infact a SoapMessage with Header and Body defined inside a SoapEnvelope.  

      I am picking it up as a XML document, after that I need to access some fields in the Header and body seperately.

      What is the best bet for me? I am using Xpath but people say that its a performance hit.

      Please guide me.

    • #20892

      Inside an orchestration, XPath is pretty much the only way you can get to a field in an XmlDocument.  Even if you use distinguished fields, BizTalk is using XPath on the back end.  XPath should be fine.

    • #20894

      I’d second Russell’s comments re. XPath, however if you are new to BizTalk, it may be better to go down the Distinguished Field route as that is certainly easier than hand-cranking XPath in an Expression shape.

      also bear in mind that if you write custom XPath and update your schemas so that XPath is no longer valid, the compiler won’t pick it up and you will only notice the problem once you get to deployment/test.

      A couple of links to get you started with XPath inside of Expression Shapes:

      Rgds, Nick.

      • #20946

        Thanks for the reply, both of you.

        According to one my collegue’s suggestion, I created a C# library and in that library I get the Header and Body as it is a SoapMessage. Deserialized the Header. Body is available with GetBodyObject of the SoapEnvelope and then.. called the library from Orchestration.

        What do you guys think about this approach.. Please let me know if you see any negatives.

        Thanks,

        • #20959

          Seems like a good approach to me.

        • #20960

          I would personally go with XPath in an orchestration, as loading an external assembly will incur additional overhead and I personally don’t like to manage additional assemblies if I can help it. This approach however is technically valid.

          Nick.

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