08-12-04 12:49 PM
1. You must create an Assembly that contain (from your url):
private static XmlDocument _template = null;
private static object _sync = new object();
private static String LOCATION = @"C:\MyTemplateLocation\MyMsgTemplate.xml";
public static XmlDocument GetXmlDocumentTemplate()
{
XmlDocument doc = _template;
if (doc == null)
{
// Load the doc template from disk.
doc = new XmlDocument();
XmlTextReader reader = new XmlTextReader(LOCATION);
doc.Load(reader);
// Synchronize assignment to _template.
lock (_sync)
{
XmlDocument doc2 = _template;
if (doc2 == null)
{
_template = doc;
}
else
{
// Another thread beat us to it.
doc = doc2;
}
}
}
// Need to explicitly create a clone so that we are not
// referencing the same object statically held by this class.
doc = (XmlDocument) doc.CloneNode(true);
return doc;
}
2. in your Biz-project add the assembly to your references3. add the
assembly to GAC (gacuil /i /f filname)This sample create message from the
file C:\MyTemplateLocation\MyMsgTemplate.xml, do you want to have
this?Christian"Christoffer" <christoffer@nospam.com> wrote in message
news:O1dLDREgEHA.3416@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> I'm about to construct a message using the Message Assignment Shape in my
> Orchestration. Now, I found out in the BizTalk documentation
>
(http://msdn.microsoft.com/library/d...n-us/sdk/htm/eb
> iz_prog_orch_guxr.asp) that the syntax for creating a message is:
>
> MsgOut = CreateMsgHelper.Helper.GetXmlDocumentTemplate();
>
> My message is a "SupplierAnswer" so I replaced the "MsgOut" with
> "SupplierAnswer", that is:
>
> SupplierAnswer = CreateMsgHelper.Helper.GetXmlDocumentTemplate();
>
> But got the error "identifier CreateMsgHelper does not exist in...", so I
> had a look at the Internet and found this piece of code:
>
> InvoiceMsg = InvoiceMsgConstructor.Helper.GetXmlDocumentTemplate();
>
> So I replaced "InvoiceMsg" with "SupplierAnswer", that is:
>
> SupplierAnswer =
SupplierAnswerConstructor.Helper. GetXmlDocumentTemplate();
>
> But got the error "identifier SupplierAnswerConstructor does not exist
> in...".
>
> Could any please tell me what the syntax is for constructing the
> SupplierAnswer message?
>
> Thanks for any help,
> Chris
>
>
[ Post a follow-up to this message ]
|