Web Services

Viewing 1 reply thread
  • Author
    Posts
    • #17557
      How can i invode a web service from an orchestration by passing parameters and getting return value.  The web service accepts parameters of .NET type and the return value is also of .NET type.
      If the parameters and return value are of custom types then we will get those types as schema in the orchestration and we can use the transform shape to build this messages.  But how this is done when the web service is accepting more than one .NET types as parameters and return a .NET type.
      Thanks
      Vin
    • #17558

      If the return value is a simple value type, then you just get that back.  If a complex value is returned, when you set up the web service (add –> web reference) BizTalk generates the schema representing the complex type.  Then you just construct that message like any other (if the complex type is an input) or work with it as a message on the output.

      Make sense?

      • #17560

        That is clear.  But how we can pass parameters to a web method if the method takes one or more simple types as parameters.

        • #17561

          I see.  To do this. you'd do a "construct message" for the input, and simply set each parameter:

           MyNewMsg.ID = "1234";

          MyNewMsg.Name = "Richard";

           And then send that msg to the service. No need for a map or anything to construct input for simple type(s).

          • #17562

            To do that, do we have to keep any shape inside the construct shape – for eg message assignment shape or something like that. 

             Or is there provision to give assignments as in your previous message inside the construct shape itself.

            • #17563

              Good question.  You actually have a "Construct" with a "Message Assignment" inside which holds the sample code I had there before.  The key is that no "regular" steps (maps, one message = another) are required, just simple setting of values.

              • #17564

                Great. I was searching for this piece of informaton for some time. Thanks a lot.

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