Home Page › Forums › BizTalk 2004 – BizTalk 2010 › SOAP message › Re: SOAP message
Sure, you can use XPath without a schema. Here’s how it works:
1. To extract a string of data out of the message, you could create an orchestration string variable called strData.
2. Add an expression shape to the orchestration.
3. Inside the expression shape, set the value of strData by calling the xpath() function. Ex:
strData = xpath(soapMsg, “string(//*[local-name()=”Data”])”);
The first parameter is the message to query. The second parameter is the actual XPath query. Here is a good article on the xpath() function: http://geekswithblogs.net/sthomas/archive/2004/10/25/13269.aspx. Since you have schemas for the header and body, you may want to pull the header and body out of the SOAP message at the beginning of the orchestration, and then work directly with the header and body messages. Then you could define distinguished fields in the schemas. Distinguished fields allow you to access the data in a cleaner fashion. Ex:
strData = bodyMessage.Data;