Search code examples
biztalkbiztalk-2013r2

Testable map base xml to flat file fails in BTS2013r2


I have lots of BTS2010 unit tests that check an XML file can be mapped to flat file.

I have developed my first of such tests on BTS2013r2 but on executing TestableMapBase.TestMap(_inputFilename, _inputType, outputFilename, _outputType), I get the error "Generate schema instance failure"

I've used reflector to debug the MS assemblies and got as far as the following line within CFrameworkSchemaTreeExtensions.cs of Microsoft.BizTalk.TOM.Adapter :

infoArray = instanceGenerator.GenerateInstance(filename, xmlInstance);

on executing, the infoArray is populated with the following error

ErrorInfo: hexadecimal value 0x00, is an invalid character. Line 2, position 1."

Prior to executing I have taken the content of xmlInstance, pasted into Notepad++ and used the Hex plugin to search for null characters (hex 0x00), there are none.

I have tried many different XML inputs to the maps on two different BizTalk development laptops and get the same result.

Has anyone been able to successfully run tests of XML to flat file in BTS2013r2?

Today I have created the most basic of solutions (1 BizTalk project + 1 unit test project) in order to test if this really is a Microsoft bug. It does seem that way because I got the same error when running this very simple test on a third BizTalk development laptop. I have added the source code to the following github repo: https://github.com/RobBowman/FFMapFailBTS2013r2


Solution

  • Microsoft have published a hotfix for this - see: https://social.msdn.microsoft.com/Forums/en-US/cacecbfd-8b71-409c-bd59-2eed26950f25/test-map-to-flat-file-in-bts-2013r2-does-this-ever-work?forum=biztalkgeneral