|
Home > Archive > BizTalk Server Orchestration > July 2005 > What's so special about the XmlDocument Message-Type?
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 |
What's so special about the XmlDocument Message-Type?
|
|
|
| Hi all!
I'm using Messages to store some external streams I receive during an
orchestration. I found no way to directly assign the Stream to the Message in
an orchestration shape, so I'm using an assembly like this:
void AssignMessage(XLANGMessage m, Stream s) {
m[0].LoadFrom(s);
m.Dispose();
}
and call it in a MessageConstruct/Assignment-Shape.
Now this works fine as long as the MessageType is XmlDocument (or even some
Schema-based type). Setting the MessageType to something else (e.g. Stream,
String, Object) always results in some sort of Exception.
I'm a bit uncomfortable with the XmlDocument-thing, because the Stream may
actually consist of non-XML-data, however BizTalk seems fine with that. I can
get the Stream back via RetrieveAs(), it survives persistence points and
dehydrations.
I just wonder why the XmlDocument seems to be so preferred?
Thanks for some enlightenment on that issue.
TToni
| |
| Michel Prévost 2005-07-04, 5:53 pm |
| Using XmlDocument as message type works with non-XML messages. We used it to
process binary files through orchestrations
"TToni" <TToni@discussions.microsoft.com> wrote in message
news:FC58781C-6241-4625-A136-68223E21671B@microsoft.com...
> Hi all!
>
> I'm using Messages to store some external streams I receive during an
> orchestration. I found no way to directly assign the Stream to the Message
> in
> an orchestration shape, so I'm using an assembly like this:
> void AssignMessage(XLANGMessage m, Stream s) {
> m[0].LoadFrom(s);
> m.Dispose();
> }
> and call it in a MessageConstruct/Assignment-Shape.
>
> Now this works fine as long as the MessageType is XmlDocument (or even
> some
> Schema-based type). Setting the MessageType to something else (e.g.
> Stream,
> String, Object) always results in some sort of Exception.
>
> I'm a bit uncomfortable with the XmlDocument-thing, because the Stream may
> actually consist of non-XML-data, however BizTalk seems fine with that. I
> can
> get the Stream back via RetrieveAs(), it survives persistence points and
> dehydrations.
>
> I just wonder why the XmlDocument seems to be so preferred?
>
> Thanks for some enlightenment on that issue.
>
> TToni
| |
|
| Yes, I noted that. The question is: Why does it work? And why does it work
only with XmlDocument? It seems like some kind of undocumented feature to me,
which makes me slightly nervous when I'm working in a live enterprise
environment.
"Michel Prévost" wrote:
> Using XmlDocument as message type works with non-XML messages. We used it to
> process binary files through orchestrations
>
| |
| Michel Prévost 2005-07-05, 5:51 pm |
| Not sure, but I think it just wraps the message into an envelope (like it
does for other messages), probably transforming binary messages into base64
"TToni" <TToni@discussions.microsoft.com> wrote in message
news:AA977037-2E5B-4944-8421-5495D9400202@microsoft.com...
> Yes, I noted that. The question is: Why does it work? And why does it work
> only with XmlDocument? It seems like some kind of undocumented feature to
> me,
> which makes me slightly nervous when I'm working in a live enterprise
> environment.
>
>
> "Michel Prévost" wrote:
>
>
|
|
|
|
|