06-02-06 12:14 AM
Dave,
You cannot directly manipulate the Xlang message by assigning nodes.
And you have to create the NewExpandedResponse first by using a map or using
an XmlDocument object.
You can use an xmlDocument to do this.
xmlDocument1.LoadXml("string of NewExpandedresponse");
xmlDocument2.LoadXml(OnyxOrgRegResponseMessage.ExecuteResult);
<manipulate nodes of doc1 and doc2 using clone append, etc>
NewExpandedResponse = xmlDocument1;
You can use the xpath function:
I have not tried this mechanism of assigning a node via xpath only node
content but it is supposed to work
xmlDocument1.LoadXml("string of NewExpandedresponse");
NewExpandedResponse = xmlDocument1;
xmlDocument2.LoadXml(OnyxOrgRegResponseMessage.ExecuteResult);
xpath(NewExpandedResponse, "xpath string") = xmlDocument.DocumentElement;
You can use a transform to merge two messages:
xmlDocument1.LoadXml("string of NewExpandedresponse");
NewExpandedResponse = xmlDocument1;
xmlDocument2.LoadXml(OnyxOrgRegResponseMessage.ExecuteResult);
OnyxResponseMessage = xmlDocument2;
Then add a transform shape after the messageassignment.
Add NewExpandedResponse and OnyxResponseMessage as source document and
create a new map.
Biztalk will concatenate the two messages together and pass then to the
transform shape
You can use properties or distinguished fields to assign node values, how
many nodes are in OnyxOrgRegResponseMessage.ExecuteResult
Greg
"fullflavedave" <fullflavedave@discussions.microsoft.com> wrote in message
news:02CE01E1-922D-4179-AF32-421EF635B2DF@microsoft.com...
>I am using the Assign Message shape in BizTalk 2006. I want to take a
>string
> that contains XML
> ("<recordType1><recordType2><element></element></recordType2></recordType2
>")
> and assign it to a message node. How would I do this? I guess my main
> question is this: what kind of .NET types are the message nodes? I have
> tried XMLNode and XMLNodeList and even XMLDocument, but none work.
>
> My code in the expression editor is below (the last assignment statement
> doesn't work). NewExpandedResponse is a message whose schema I have
> created.
> ExecuteResult is a node of type string, but it only contains XML. I want
> to
> take this XML that is in String form in this node and assign it to the XML
> node in my message, NewExpandedResponse.ExecuteResult.returnXml.
> returnXml
> is a complexType with child nodes mathing the structure of the XML string
> in
> ExecuteResult. I have created xmlDocument and xmlNode as variables (of
> their
> namesake types) within the orchestration.
>
> ...
> xmlDocument.LoadXml(OnyxOrgRegResponseMessage.ExecuteResult);
> xmlNode = xmlDocument.CloneNode(true);
> NewExpandedResponse.ExecuteResult.returnXml = xmlNode;
>
> The error I get is "can't implicitly convert type System.XML.XmlNode to
> type
> OnyxOrgRegExpandedResponse.ExecuteResult.returnXml"
>
>
> Any help is much appreciated!
>
> Thanks,
> Dave
[ Post a follow-up to this message ]
|