Recently I encountered a rather fresh error while publishing an orchestration as a web service. 'The datatype '' is missing' was the gist of the complaint during the publishing process (This error could be different in different situations but mostly it should complain about some sort of datatype).
Looking behind the scenes, my best guess was that serialization had to be the culprit directly or indirectly since thats the only non-trivial subprocess taking place during the whole publishing process (virtual directory creation, .NET project creation are trivial by definition :)). So after some investigation, I managed to isolate the problem and turned out that it was indeed XSD.exe's inability to compile the schema into a class. For the record, XSD has its limitation when it comes to interpreting xml schemas into .NET classes. XSD union element, although legal by XML standards cannot be handled properly by XSD.exe tool. Some might think that XSDObjectGen may be the cure to the above, but in my situation that couldnt help either and gave me a mysterious 'URI Formats are not supported' error.
(Please refer to http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_fxgenref/html/18c29a99-3e22-4ea9-971a-b4dbe8e4f476.asp for more information regarding limitations of the XSD tool.)
Luckily, the schema I was working with only required me to do a single union manipulation and thereafter running the xsd tool worked fine and created the .NET classes. Once this was successfully achieved, I ran the Publishing wizard again and as expected it published the web service like a breeze.