|
Home > Archive > BizTalk Server General > May 2005 > How to construct Multipart messages?
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 construct Multipart messages?
|
|
| Ayman Dabees 2005-05-23, 5:53 pm |
| I was trying to initialize a multipart message in the "assignment shape" in
the "construct message" shape, but i could not succeed. The visual studio
return an error "use of uncostructed message" if i tried to set a value for
promoted field.
Is it enouph to use a "construct shape" with message type equal to the type
of the multipart message i want to create? or i must use a "Transform" shape
from existing message!!?
Thanks in advance
Ayman
| |
| Scott Colestock 2005-05-23, 5:53 pm |
| If your only construction of the message was setting a promoted property or
distinguished field, that won't do it.
You need to either assign the message to another message, or have it be the
output of a transform, or load its contents manually with an XmlDocument, or
use a .NET component (that either returns an XmlDocument or a
System.Xml-serializable class.) (Or receive the message ;))
See
http://www.traceofthought.net/Perma...e4e8dc46d4.aspx
for a little bit more on this topic.
Scott Colestock
www.traceofthougtht.net
"Ayman Dabees" <AymanDabees@discussions.microsoft.com> wrote in message
news:2E893990-D788-4239-9495-3653F2F8160E@microsoft.com...
>I was trying to initialize a multipart message in the "assignment shape" in
> the "construct message" shape, but i could not succeed. The visual studio
> return an error "use of uncostructed message" if i tried to set a value
> for
> promoted field.
>
> Is it enouph to use a "construct shape" with message type equal to the
> type
> of the multipart message i want to create? or i must use a "Transform"
> shape
> from existing message!!?
>
> Thanks in advance
>
> Ayman
| |
| Phua Chiu Kiang 2005-05-24, 6:01 pm |
| Interesting article Scott. I've had some reservations about constructing
messages by embedding strings or even loading templates in the orchestration,
mainly because you'd have to maintain both the BizTalk schema and the
template, and make sure that the templates get updated if you make changes to
the schema in BizTalk editor. I'd even thought about writing a .NET helper
class to read the schemas directly off the BizTalkMgmtDB.
In the end, i think the simplest approach (for me) is to just use a
Transform shape and create a map to construct the message in the
orchestration. Interestingly, the map does not have to have any links
between the source and dest, although it must do something otherwise you
would get a 'root is null' error. So i will just specify an arbitrary msg as
the source, and the msg i want to construct as the dest, and then drop in a
String Concatenation functoid or something useful and link it to a node in
the destination msg. The message gets constructed with default properties
and we can happily populate it with our distinguished or promoted values.
The good thing about this is that we don't have to worry if the schema is
changed in future.
I do wish MS will, in the next release, just give us a shape or function to
just construct any message we want without going through all this trouble
though ;).
Cheers,
ck.
---
Phua Chiu Kiang
http://www.pckconsulting.com
"Scott Colestock" wrote:
> If your only construction of the message was setting a promoted property or
> distinguished field, that won't do it.
>
> You need to either assign the message to another message, or have it be the
> output of a transform, or load its contents manually with an XmlDocument, or
> use a .NET component (that either returns an XmlDocument or a
> System.Xml-serializable class.) (Or receive the message ;))
>
> See
> http://www.traceofthought.net/Perma...e4e8dc46d4.aspx
> for a little bit more on this topic.
>
> Scott Colestock
> www.traceofthougtht.net
>
>
> "Ayman Dabees" <AymanDabees@discussions.microsoft.com> wrote in message
> news:2E893990-D788-4239-9495-3653F2F8160E@microsoft.com...
>
>
>
|
|
|
|
|