Initialising WCF Multi-part messages with LoadXML Statement

Monday, September 26, 2011
Q:
Good morning fellows,
I am trying to initialise a Multi-part message to make a call to a WCF service in a construct shape

oWrapper = new BTSSchemasWrapper.Wrapper_OracleWithTracing();
oXMLDoc = new System.Xml.XmlDocument();
oXMLDoc.LoadXml(oWrapper.GetXml_Trace_Reale_Trace_Writelog);
msgTrace.parameters = oXMLDoc;
where BTSSchemasWrapper gets the xml stored in a class.
Well, that code up there works with a simple mono part message but not with the multi part messages, what can I be missing in  the initialisation?
I have tried making a map and it works too. But I would rather use xml initialise if possible.

Thanks in advance

Sol: 
Hello Carlos,
Create a message msgParameters within BizTalk orchestration view which is of type System.Xml.XmlDocument.
Just before you asssign to the WCF multipart message, add this line.
msgParameters = oXMLDoc;
And then assign this msgParameters to the WCF multipart
msgTrace.parameters = msgParameters;
I guess this should resolve your issue.
Regards


No comments:

Post a Comment

Post Your Comment...