10-16-04 02:09 AM
Thanks for that,
Actually the error occurs when i try to use the message in a map.
after creating the message in the assign shape, i wrote it to file and it
writes out ok as a valid xml document.
This is even more puzzling, if i can write out the message to file using a
send shape, why can't i use the message in a map? The map is the very next
step after the send shape.
"Stephen W. Thomas" wrote:
[vbcol=seagreen]
> Are you creating a new instance of your schema before this step?
> If not, you need to do something like this first:
>
> // Create a new Xml Document
> xDoc = new System.Xml.XmlDocument();
>
> // Load a blank schema into your Document
> // This line might not be needed, I think I have got it to work without it
> xDoc.LoadXml(“<root>…blank schema here”);
>
> // Set that Xml document to your message
> msgOrderDocument = xDoc;
>
> // Your line of code here
>
> The help guide talks about a few different ways to create an new instance
of
> a schema.
>
> On a side note, I think it is possible to map a message that is an
> XmlDocument to another message that is XmlDocument. Both the inbound and
> outbound have to be defined as messages so I do not think it would solve t
his
> problem. To do this mapping, just look in the help guide for “Assigning
to
> Transforms Dynamically”. The code looks something like this:
>
> Inside an Expressions Shape (not Message Assignment even though you use a
> Construct)
>
> construct outXmlMessage
> {
> transform (outMmlMessage) = Project.Mapname(inXmlMessage);
> }
>
> This can be risky though, I have seen my messages just pass right through
> without being mapped and gives no error. I think it was because the messa
ge
> types didn’t match what the maps were expecting… i.e. user error.
>
> Stephen W. Thomas
> http://www.geekswithblogs.net/sthomas
>
>
> "Mangi" wrote:
>
[ Post a follow-up to this message ]
|