Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Xpath in Biztalk
- This topic has 5 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
September 29, 2008 at 9:37 AM #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.
-
October 1, 2008 at 5:51 PM #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.
-
October 2, 2008 at 5:13 AM #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:
- http://geekswithblogs.net/sthomas/archive/2004/10/25/13269.aspx
- http://seroter.wordpress.com/2007/03/19/fun-with-biztalk-xpath-and-namespaces/
- http://jpcik.blogspot.com/2006/08/biztalk-server2006-and-xpath.html
Rgds, Nick.
-
October 10, 2008 at 8:25 AM #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,
-
October 12, 2008 at 5:44 PM #20959
Seems like a good approach to me.
-
October 13, 2008 at 1:28 AM #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.
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.