Object Reference not set to an instance of an object

Home Page Forums BizTalk 2004 – BizTalk 2010 Object Reference not set to an instance of an object

Viewing 2 reply threads
  • Author
    Posts
    • #24176

      Hi I am calling .Net assembly from orchestration and I am getting an error “Object Reference not set to an instance of an object”. I am calling a serializable class with non-static method. in the orchestration view I created a variable and assigned to the .net class and I am calling in the expression shape.

      varString = classvariable.classmethod(str);

      can anyone tell me where I am going wrong?

       

      Thanks

    • #24180

      Do you return a variable string in your .NET assembly?

      Type your code here, so we can analyze better.

      • #24181

        Hi Thanks for the response, here is my code, the method returns a string.

        ResponseString = varValidateXml.ValidateXml(ResponseString);

        varValidateXml is the variabe that I have created ti instantiate the class.

        Thanks

    • #24184

      Hi,

       

        If you did not declare your C# class and methods as static, then you will have to instantiate your class object in the BizTalk Expression shape, before invoking your method. Do something like this:

       

      varMyClass = new Class();

      varString = varMyClass.classmethod(str);

       

         Daniel.

       

      • #24187

        Initilization of the .Net class must be done however ..also ensure the scope of the variable if you initilize it some where else…and use it might not work so make sure its a Orcehstartion level variable.

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