Many of us would have faced Use of unconstucted Message Error in the Construct Message shape.
Our need would have been to only intialize it with empty constructor. But it would force us to create a message by
1. Loading and empty xml instance of the xsd schema type.
2. Use a Biztalk mapper to transform from a different message.
Simpler way is to use:
a. Xsd.exe to convert the schema to a .cs file.
b. Add the .cs to file to a csharp class library project.
c. Add reference from the bts project to the class library
d. Create a variable of the csharp datatype created by xsd.
e.In the construct shape Assign Msgx = Variablex, this will initialize the variable with the default values and it is error free.
You need to regenerate the .cs file using xsd.exe whenever the schema changes .