05-30-06 12:15 PM
Pieter,
All typed documents are Xml in Biztalk.
The use of transforms, promoted properties and distinguished fields are only
possible with Xml data.
The "Validate Instance" command will take a flat file, disassemble it into
Xml and compare with the schema.
The "Generate Instance" will produce an example flat file or Xml. If you
chose flat file then an Xml file is created and "assembled" into the flat
file output.
The standard way of handling flat files is to disassemble into Xml in a
pipeline, perform necessary processing and then assemble into a flat file in
the send pipeline.
Creating a string and then disassembling into Xml in the orchestration is
redundant, you might as well create the Xml and save yourself a step.
Automatically creating a sample instance is fine in a design time situation,
doing this in the runtime is very difficult. There are too many variables.
Do you include optional fields?, What about dates. what date do you use,
numbers are the same. If a element has a data type on xs:int then it must
contain a valid integer if the node exists. It would be very difficult to
create a single method that would suit everybody.
One way you can create this message is to use C#. You can create .Net class
based on your schema (xsd.exe), in a class library create an instance,
populate with data and serialize into Xml. This class can be compiled,
GAC'ed and called from your orchestration.
e.g.
static public System.Xml.XmlDocument MyNamespace.CreateMessage()
from an orchestration:
FFDocument = MyNamespace.CreateMessage();
Greg
"Pieter Bart van Straalen" <pbstraalen@schouw.org[Remove]> wrote in mess
age
news:eyqUP7xgGHA.1208@TK2MSFTNGP02.phx.gbl...
> Thanks for your reaction,
>
> Ok, so all documents are xml in biztalk, even flatfiles.
> But creating the new message the way you describe is not possible because
> the message is to big and complex.
>
> When i'm working in VS i can select a schema from the solution explorer
> and do "Validate Instance". Biztalk creates the xml flatfile structure for
> me. I want to do this from within an orchestration.
>
> So in my orchestration i want to do the following:
> 1. Create the new document and put it in a string var.
> 2. Parse string var to biztalk xml
> 3.Create new message --> xmlDocument.LoadXml (Parsed String)
>
> Can this be done?
>
> Regards,
> Pieter.
>
> "Greg Forsythe" <greg.forsythe@gmail.com> wrote in message
> news:uUHXWnmfGHA.2032@TK2MSFTNGP02.phx.gbl...
>
>
[ Post a follow-up to this message ]
|