Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Interesting Scenario with WebService Call Suggestions needed.
- This topic has 6 replies, 1 voice, and was last updated 9 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
May 27, 2008 at 11:14 AM #19768
I have an Orchestration in which calling a web service By passing 270 xml document in the form of string (Web Service eccept only as a string And returns back 271 As a string ) to the web service. I am passing 270 as a string but once i get responce from web service as a string i need to map to actual 271. How should i accept that string from web service(There is no schema defined for output from web service which i am thinking of creating one) and What would be the schema and all for mapping back to original 271 for sending out any help or suggetions would be highly appreciated.
-
May 27, 2008 at 11:52 AM #19769
Looks interesting need to think over it….[^o)]
-
May 27, 2008 at 3:08 PM #19772
The easiest way would be to use the xpath function in a message assignement shape:
Message271 = xpath(WebServiceResponseMessage, “/child::*/child::*[1]“);
-
May 28, 2008 at 7:45 AM #19775
“/child::*/child::*[1]” Is it for getting perticuler string ?? Could u please elaborate this .As WebServiceResponse Message Is in the form of string which could i cast back to xmldocument ?.
-
May 28, 2008 at 8:46 AM #19776
Another approach would be to load an XmlDocument from the string, and then assign it to the 271 message:
GenericXmlDoc = new System.Xml.XmlDocument();
GenerixXmlDoc.Load(WebServiceResponseString);
271Message = GenericXmlDoc;
I would probably go with the XPath approach though, because it is only 1 line of code!
-
May 28, 2008 at 11:17 AM #19779
Thanks greg and ruselw it works!!!!!!!!!!
Thanks for Help…
-
May 28, 2008 at 12:45 PM #19781
The /child::*/child::* xpath expression returns the first child of the first child of the document. You could have use /string/child::*[1] as <string is the first node.
All the casting and message manipulation is done by Biztalk. The orchestration compiler converts that line into the appropriate C# code.
ruselw, you forgot to remove the <string> wrapper node from the message oops missed the string cast
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.