Interesting Scenario with WebService Call Suggestions needed.

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Interesting Scenario with WebService Call Suggestions needed.

Viewing 1 reply thread
  • Author
    Posts
    • #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.

    • #19769

       Looks interesting need to think over it….[^o)]

      • #19772

        The easiest way would be to use the xpath function in a message assignement shape:

        Message271 = xpath(WebServiceResponseMessage, “/child::*/child::*[1]“);

         

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

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

            • #19779

               Thanks greg and ruselw it works!!!!!!!!!!

               

              Thanks for Help…

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

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