BizTalk Server Orchestration - declaring and instantiating objects

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > June 2005 > declaring and instantiating objects





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 declaring and instantiating objects
PeterW

2005-06-21, 7:55 am

I want to declare and construct an object. I read (BizTalk Server 2004
Unleashed)that I can create and use any .NET class referenced in the project
in expressions.

So I use syntax like:
ClassName o = new ClassName(); to declare and instantiate an object instance
as I would in C#. The Expression editor does not allow this even though it
is possible to access the classes which have references added in the project.
It shows an error message: "illegal declarator: declarations may only appear
in a service or scope".

There is no service shape within an orchestration.

So I try the scope shape and find I can't do what I want either.

Why is this and how should objects be declared and instantiated and what is
the scope of the objects so created.

cheers
--
PeterW
Marvin Smit

2005-06-21, 7:55 am

Hi,

You are actually using a XLang language (very similar to C#). The
trick is to make a variable in your orchestration and have it be the
type of your object.

If you want to use instance methods, you'll have to make this variable
and let it call the constructor of your object. (can be default
constructor).

If you want to use static methods, you only have to set a reference to
the .Net type, make sure its signed & gac'ed and you can use the
static functions directly (in an expression shape for instance).

Hope this helps,

Marvin Smit.


On Tue, 21 Jun 2005 03:45:03 -0700, PeterW <nspw@noemail.nospam>
wrote:

>I want to declare and construct an object. I read (BizTalk Server 2004
>Unleashed)that I can create and use any .NET class referenced in the project
>in expressions.
>
>So I use syntax like:
>ClassName o = new ClassName(); to declare and instantiate an object instance
>as I would in C#. The Expression editor does not allow this even though it
>is possible to access the classes which have references added in the project.
> It shows an error message: "illegal declarator: declarations may only appear
>in a service or scope".
>
>There is no service shape within an orchestration.
>
>So I try the scope shape and find I can't do what I want either.
>
>Why is this and how should objects be declared and instantiated and what is
>the scope of the objects so created.
>
>cheers


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com