BizTalk Gurus

Object Reference not set to an instance of an object

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 4 Replies | 1 Follower

posted on Mon, Feb 1 2010 3:33 PM

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

All Replies

Top 150 Contributor
10 Posts
Suggested by Ruth Resende

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

Type your code here, so we can analyze better.

replied on Tue, Feb 2 2010 7:48 AM

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

Top 10 Contributor
241 Posts
Suggested by xman71

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.

 

"Google skills are more important than your coding skills."

replied on Tue, Feb 2 2010 10:06 PM

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.

Page 1 of 1 (5 items) | RSS