BizTalk Server Orchestration - Creating a message instance

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > July 2005 > Creating a message instance





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 Creating a message instance
STom

2005-04-29, 6:06 pm

If you attempt to use a message variable within an orchestration and have
not created an instance of it, you get an error.

I know two ways to do this are:
1. If the message is like the incoming message, you can use an expression
shape and just say Msg2 = Msg1;
2. You could create a dummy transform shape that has any source schema and
the required destination schema and without creating any links within the
map, let the map create the instance. Kind of a hacked way of doing it.

But what would another method of creating an instance be? Would you create
an instance of an XMLDocument and then somehow associate it with a schema?
What would the code in the expression shape look like?

Thanks.

STom


Yves Peneveyre

2005-05-02, 7:47 am

Hello !

A way to do what you want is to assign your message variable in an
expression shape using a helper, like that :
msgMyMessage = aHelper.NewMessage();

And, in your helper (in C#), you could have :
public static XmlDocument NewMessage()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("<ns0:Root
xmlns:ns0=\"http://my.namespace.here\"><someTagsHere></someTagsHere></ns0:Ro
ot>");
return doc;
}

That _could_ be a way. Not the best, firstly because the XML is hard coded,
but it is an example.....

Best Regards

Yves Peneveyre


"STom" <stombiztalker@hotmail.com> wrote in message
news:OkDwGaMTFHA.3544@TK2MSFTNGP12.phx.gbl...
> If you attempt to use a message variable within an orchestration and have
> not created an instance of it, you get an error.
>
> I know two ways to do this are:
> 1. If the message is like the incoming message, you can use an expression
> shape and just say Msg2 = Msg1;
> 2. You could create a dummy transform shape that has any source schema and
> the required destination schema and without creating any links within the
> map, let the map create the instance. Kind of a hacked way of doing it.
>
> But what would another method of creating an instance be? Would you create
> an instance of an XMLDocument and then somehow associate it with a schema?
> What would the code in the expression shape look like?
>
> Thanks.
>
> STom
>
>



Emmanuel Issaly

2005-07-01, 7:48 am

hi,

why isn't this working directly in the expression shape?

also, i'd like to load a schema instead of hardcoding the xml... what would
be the syntax?
i cannot i think use .net because i must conform to BPEL and target systems
could be others than .net...

thanks!

"Yves Peneveyre" wrote:

> Hello !
>
> A way to do what you want is to assign your message variable in an
> expression shape using a helper, like that :
> msgMyMessage = aHelper.NewMessage();
>
> And, in your helper (in C#), you could have :
> public static XmlDocument NewMessage()
> {
> XmlDocument doc = new XmlDocument();
> doc.LoadXml("<ns0:Root
> xmlns:ns0=\"http://my.namespace.here\"><someTagsHere></someTagsHere></ns0:Ro
> ot>");
> return doc;
> }
>
> That _could_ be a way. Not the best, firstly because the XML is hard coded,
> but it is an example.....
>
> Best Regards
>
> Yves Peneveyre
>
>
> "STom" <stombiztalker@hotmail.com> wrote in message
> news:OkDwGaMTFHA.3544@TK2MSFTNGP12.phx.gbl...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com