I\'m looking for your best solutions for creating a new message instance based on a pre-defined XSD schema to be used within a Biztalk orchestration.
Extra votes go
xsd.exe /classes /namespace:MyNamespace myschemafile.xsd
You can use this to generate c# classes for a given schema file. The result is a .cs file that you can include in one of your solution projects.
When using within a "Message Assignment Shape", you can instantiate one of these generated classes, fill out values for all it's properties, then finally assign the Message part to your instance. Biztalk will auto-magically serialize the instance for you. Nice and OO. No need for any fancy xlang stuff.
I didn't really have much luck with some of the other solutions like loading up a temp XmlDocument with hardcoded XML, or going the whole hog and using the documentSpecification.GetDocSchema().CreateXmlInstance() that others have suggested.