How to create an instance of a .NET object?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > How to create an instance of a .NET object?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to create an instance of a .NET object?  
Stevie


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-16-04 11:49 PM

This may sound really stupid, but I can't believe that I am having a
really hard time creating an instance of my .NET object.

I added an Expression shape, and I added a code snippet as such.

MyNameSpace.Data myData;

I am using the default constructor so according to the Help, I don't
have to do a  new MyNameSpace.Data(), right?

Anyway, the design-time error is "illegal declarator: declaration may
only appear in a service or a scope."

The expression is already inside a scope. As you can tell, I'm a newbie
at BizTalk.

Can someone please help?

TIA!






[ Post a follow-up to this message ]



    RE: How to create an instance of a .NET object?  
biztalker


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-16-04 11:49 PM

I believe the problem is having declared the variable in the expression
shape. Instead of declaring the variable (myData) in the expression shape,
you will need to create an orchestration variable (just like you create a
message object). So given that you have the reference added to your .NET
assembly, just go to the orchestration view, right click variables and selec
t
'New Variable'. In properties you can set it's name and can select type by
choosing <.NET class> and browsing to your referenced assembly. Then in your
expression shape, you can instantiate your object.

"Stevie" wrote:

> This may sound really stupid, but I can't believe that I am having a
> really hard time creating an instance of my .NET object.
>
> I added an Expression shape, and I added a code snippet as such.
>
> MyNameSpace.Data myData;
>
> I am using the default constructor so according to the Help, I don't
> have to do a  new MyNameSpace.Data(), right?
>
> Anyway, the design-time error is "illegal declarator: declaration may
> only appear in a service or a scope."
>
> The expression is already inside a scope. As you can tell, I'm a newbie
> at BizTalk.
>
> Can someone please help?
>
> TIA!
>
>





[ Post a follow-up to this message ]



    Re: How to create an instance of a .NET object?  
Stevie


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-16-04 11:49 PM

Thanks, biztalker. It worked. You rock!






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:00 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register