Who never call a c# method in an orchestration and pass an XmlDocument which will be serialized further in the method execution.
A trick exist to avoid the step of serializing.
Here is the way
you write a schemas :
You generate the class with xsd command line :
xsd.exe -c -l:c# IdentitiesSample.xsd
public class Sample
public static void SomeMethod(SampleLibrary.Entity.Identities IdentityObj)
Note : as you can see I put the C# object as parameter
Now in your orchestration you can call your new method without use any XmlDocument or any XmlSerializer :
Now Compile, and it works. Now no more any serializer and other method, it’s simplier.
Note : when you deserialized, if you have a very complicated schema where you checked the property_specified, you can’t use this trick, because this method don’t check the specified field