BizTalk Server Orchestration - Constructing a message in orchestration

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > October 2005 > Constructing a message in orchestration





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 Constructing a message in orchestration
Theo

2005-10-24, 10:31 am

Hi!

I need to construct a new message within my orchestration in order to pass
it as a request to the SQL adapter. How do I build a new message with a
specified schema? I can't transform it from another message and I can't
assign it to some other message.

Thanks!

theo
Jan Eliasen

2005-10-24, 10:31 am

On Wed, 19 Oct 2005 05:21:03 -0700, "Theo"
<Theo@discussions.microsoft.com> wrote:

>I need to construct a new message within my orchestration in order to pass
>it as a request to the SQL adapter. How do I build a new message with a
>specified schema? I can't transform it from another message and I can't
>assign it to some other message.

Hi

Probably, you need the Message Assignment shape. Create a message of
the type the webservice need as request. Then in the assignmentshape,
just assign some values (constants, or taken from other messages) to
the parts of the message. If the webservice needs a complex type, then
you have a schema, which you can assign to by creating a varialbe of
the type System.Xml.XmlDocument and setting your message to this
variable.

You should take a look at
http://objectsharp.com/Blogs/matt/a...11/09/1009.aspx
--
Jan Eliasen, representing himself and not the company he works for.
Theo

2005-10-24, 10:31 am

My message is a multi-part message so I have a request and respond part. Just
creating a new variable of type System.Xml.XmlDocument and then assigning it
to my message within the construct shape raises an error saying "cannot
implicitly convert type System.XML.XMLDocument to message procedureRequest".
So there must be another way of doing the assignment....


"Jan Eliasen" wrote:

> On Wed, 19 Oct 2005 05:21:03 -0700, "Theo"
> <Theo@discussions.microsoft.com> wrote:
>
> Hi
>
> Probably, you need the Message Assignment shape. Create a message of
> the type the webservice need as request. Then in the assignmentshape,
> just assign some values (constants, or taken from other messages) to
> the parts of the message. If the webservice needs a complex type, then
> you have a schema, which you can assign to by creating a varialbe of
> the type System.Xml.XmlDocument and setting your message to this
> variable.
>
> You should take a look at
> http://objectsharp.com/Blogs/matt/a...11/09/1009.aspx
> --
> Jan Eliasen, representing himself and not the company he works for.
>

Jan Eliasen

2005-10-24, 10:31 am

On Wed, 19 Oct 2005 06:18:13 -0700, "Theo"
<Theo@discussions.microsoft.com> wrote:

>My message is a multi-part message so I have a request and respond part. Just
>creating a new variable of type System.Xml.XmlDocument and then assigning it
>to my message within the construct shape raises an error saying "cannot
>implicitly convert type System.XML.XMLDocument to message procedureRequest".
>So there must be another way of doing the assignment....

Hi

Have you looked at the URL I send? It gives some good ideas about what
you can do.

I suppose you added a webreference to your project. Did that create
and XSD's? Or did it just create two multipart message types in your
orchestration view? If it created the two multipart message types,
then you need to create a message which has the type of the request.
You should be able to assign values to this new message in a "Message
Assigment"-shape.

Like this:

RequestMessage.pParameter1 = "The is parameter 1";


--
Jan Eliasen, representing himself and not the company he works for.
Samuel L

2005-10-24, 10:31 am

That's a good question Theo...

According to the blog link Jan Eliasen posted, there seems to be no other
way of constructing a new message of a certain type than the "hard code xml"
way. Why is it so?

I think it would be great in several situations to be able to create an new
message in a more high-level way than hard coding in an expression shape. A
construction fashion that simply gives a "data empty" message which can be
filled up with data by property assigning, like MyMsg.MyProperty = <Value>;

Any comments?
Thanks in advance!

Samuel L

2005-10-24, 10:31 am

Just a clarification...

When I say "new" message I mean a brand new message coming out of nothing...
In other words a message which isn't constructed based on any other earlier
created message... In other words constructing a message without transforming
another one or simply assigning it to another one.


"Samuel L" wrote:

> That's a good question Theo...
>
> According to the blog link Jan Eliasen posted, there seems to be no other
> way of constructing a new message of a certain type than the "hard code xml"
> way. Why is it so?
>
> I think it would be great in several situations to be able to create an new
> message in a more high-level way than hard coding in an expression shape. A
> construction fashion that simply gives a "data empty" message which can be
> filled up with data by property assigning, like MyMsg.MyProperty = <Value>;
>
> Any comments?
> Thanks in advance!
>

Jan Eliasen

2005-10-24, 10:32 am

On Thu, 20 Oct 2005 03:25:02 -0700, "Samuel L"
<SamuelL@discussions.microsoft.com> wrote:

>When I say "new" message I mean a brand new message coming out of nothing...
>In other words a message which isn't constructed based on any other earlier
>created message... In other words constructing a message without transforming
>another one or simply assigning it to another one.

Well, there is nothing wrong with having a variable of the type
System.Xml.XmlDocument and then in expression shapes update the
content, using standard .NET code to create elements, attributres, and
so on. You can then assign the variable to a message at some later
point.
--
Jan Eliasen, representing himself and not the company he works for.
Samuel L

2005-10-24, 10:32 am

"Jan Eliasen" wrote:
> Well, there is nothing wrong with having a variable of the type
> System.Xml.XmlDocument and then in expression shapes update the
> content, using standard .NET code to create elements, attributres, and
> so on. You can then assign the variable to a message at some later
> point.


No, your're right there Jan... not really something wrong with that.

But what I see as a drawback is that I have to hard code the xml structure
in the .NET code and not being able to take advantage from the already
defined message shcema to create a brand new message from nothing.

Do you agree?
Thanks for your comments!

Ravi Shankar

2005-10-24, 10:32 am

Hi Samuel,

You can use the xsd.exe to create object classes for your message based on
the schema and then compile them into a helper class /w methods. Then you'd
be able to do something like message = helper.message.new() in the construct
shape.
--
Ravi Shankar


"Samuel L" wrote:

> "Jan Eliasen" wrote:
>
> No, your're right there Jan... not really something wrong with that.
>
> But what I see as a drawback is that I have to hard code the xml structure
> in the .NET code and not being able to take advantage from the already
> defined message shcema to create a brand new message from nothing.
>
> Do you agree?
> Thanks for your comments!
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com