This has definitely been my week for BizTalk surprises! Having successfully deployed several flat-file to XML maps with very little trouble, I never expected to see “Native parsing error: The path is not of a legal form” during routine testing of a new map. This error had me stumped for several hours, since my flat-file schema tested just fine against the same instance document I was using to test my map. Being a very stubborn developer, I assumed my map was at fault and proceeded to test each and every link to see where the error occurred. After several hours with no luck, I even went so far as to create a new map with no links between the inbound and outbound schemas but the same error occurred.
Then I did what I should have done much much earlier. I went to the MS support site and searched for any BizTalk Server KB articles containing the text “native parsing error”. The KB article 837857 was exactly what I was looking for, although the explanation behind this error was pretty slim. According to this article, the error occurs when your map refers to a schema in an external assembly and when the Input or Output settings for the map test are set to Native. Actually, this error only occurs if your flat-file schema is in an external assembly.
The work-around is shown below:
1. Temporarily move the schema to the same project as the map that you want to test.
2. Configure the map to use the schema now in your project.
3. Test the map using the settings you want.
4. Move the schema back to the original location.
5. Set the BizTalk Mapper back to use the original location of the schema.
6. Make sure everything is back to it’s original state before compiling your project!
The moral of this post is clear. CHECK THE KB BEFORE SPENDING HOURS DEBUGGING!
I hope MS fixes this bug very soon (can you say hot-fix?).