How to handle .net component return value.

Home Page Forums BizTalk 2004 – BizTalk 2010 How to handle .net component return value.

Viewing 1 reply thread
  • Author
    Posts
    • #13722

      I have a .net component which calls a web service and returns a string value.

      I am using the component in the biztalk project in a expression shape. The expression is as follows –

      TestWebService = new Test_WS_Call.TestClass();

      RetVal = TestWebService .TestInvoke (); where

      TestWebService is the component class object and
      RetVal is the BixTalk variable of type System.String.

      I want to write the RetVal in a folder using File adapter.

      My questions is –
      1 – Can i write the RetVal directly to the file without using a message varible
      2 – If not what i need, probably a schema, a message etc.

      If possible, please provide me step by step process.

      Thanks.

    • #13723

      I have solved it, if anyone interested here’s the solution –

      We need to use Message Assignment shape instead of Expression shape.

      The expression for Message Assignment will be –

      TestXML = new TestBPM_WS_Call.TestXMLClass();

      RetVal = TestXML.TestInvoke (\”Test Input\”);
      SendMessage = RetVal;

      Where –

      RetVal is BizTalk variable of type System.String which holds the web Service return value.

      SendMessage is BizTalk Message of type System.String.

      We need to assign send port to SendMessage.

      The web method is as follows –

      [WebMethod]
      public string GetGoodsMovement(string input)
      {
      return (\”Web service Response : \”+ input);
      }

      If we drop the following xml file in receive port –

      – <ns0:Root xmlns:ns0=\”http://TestBPM_WS_BA.ReceiveFileCommand\”>
      <Descrip>Descrip_0</Descrip>
      </ns0:Root>

      The output in the receive port will be –

      <?xml version=\”1.0\” encoding=\”utf-8\” ?>
      <string>Web service Response : Test Input</string>

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