BizTalk Server Orchestration - How to create an instance of a .NET object?

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > December 2004 > How to create an instance of a .NET object?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

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

2004-12-16, 6: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!

biztalker

2004-12-16, 6: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 select
'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!
>
>

Stevie

2004-12-16, 6:49 pm

Thanks, biztalker. It worked. You rock!

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com