How to get the Message Context in a .NET assembly

Home Page Forums BizTalk 2004 – BizTalk 2010 How to get the Message Context in a .NET assembly

  • This topic has 2 replies, 1 voice, and was last updated 3 years ago by biztalkgurus.
Viewing 2 reply threads
  • Author
    Posts
    • #12107

      Hi,

      I am calling a .NET assembly from within an orchestration.

      How do I get a handle to the message context. Specifically, distinguished fields.

      The Orchestration message is a schema

      The expression shape has the following code
      [code:1:39d9845b28]cobraWS = new Elite.BizTalk.CobraEAIModules.CobraWS();
      cobraWS.testMethod(TimeLoadXML);[/code:1:39d9845b28]

      The .NET assembly has the signature
      [code:1:39d9845b28]public void testMethod(XLANGMessage msg)[/code:1:39d9845b28]

      Thanks

      Scott

    • #12108

      Have your component assembly reference your schema assembly, and then use the GetPropertyValue method of the message.

      You will find that a type has been generated for each property/distinguished filed.

      myMsg.GetPropertyValue(typeof(MyProject.MySchemas.SomeProperty));

    • #49738
      biztalkgurus

        Empire of Lies by Raymond Khoury | 9781250210968

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