I am working in a project where Schema’s are in a seperate project. This project is compiled and deployed to the BizTalk development Server. Then when you start to work on a Solution you reference the installed DLL’s and happy coding.
Let me explain what happened. I also have a local copy of the schema project and I used one of the schema’s to generate an instance. Then I saved the instance to disk changed it a littlebit. I swithched projects and tested the map with the previously generated file. But the map had an error message about the root element is missing.
Whatever I did to test the map I still ended up with a missing root element. Then I changed the properties of the map to generate a new instance instead of the input file. The map worked flawlessly. Hmmm what the %^&*%&^%& had happened here.
Somebody had changed the schema’s a littlebit and changed the namespace a littlebit. The namespace changed from x.y.z.InformationParameterRequest to x.y.z.InformationParametersRequest.
So the moral of this story… If a map works when you generate the input document and it doesn’t work when you use the input file the input file is probably wrong.
In my case I was convinced the document was correct cause when I switched back to the schema’s projects I could validate the input instance without problems.
Then I saw a difference between the schema in the map and the schema in the Schema’s project. I then did a get latest on the Schema Project and then I couldn’t validate the input instance anymore. So then it became clear the schema was changed. And it also became clear why the map wouldn’t produce valid output. The map used the newer deployed dll for the schema.
Anyway the moral of this story is …. If a map produces a message like Root Element missing you probably have an invalid test instance.
After figuring this out I went to bloglines to see what’s new and I found this post —-> Read NisHil’s post
So it seems I am not the only one with this problem. I only wished I found that post yesterday…..