Possible Bug - Maps - Testing RRS feed

  • Question

  • Greetings,


    I am observing a peculiar behavior in the mapper in VS.Net with respect to EDI files.


    I have the following:

    A map to convert a 4010-856 to 5010-856.

    I have right clicked on the map, and selected properties.

    I have set the properties in the dialog as follows:

       Validate TestMap Input: True

       Validate TestMap Output: True

       TestMap Input Instance: E:\temp\messages\856_TestFile.edi

       TestMap Input: Native

       TestMap Output: XML

       TestMap Output instance: <blank - default>


    Now, when I right click on the map and select Test Map, I get the following error:


    Invoking component...

    Test Map used the following file: <file:///C:\Documents and Settings\cbeuker\Local Settings\Temp\inputfile.xml> as input to the map.

    C:\Documents and Settings\cbeuker\Local Settings\Temp\inputfile.xml: error btm1044: Input validation error: Root element is missing.

    Test Map failure for map file.........


    Why is it looking for InputFile.xml in my local settings temp directory?  I specified a proper existing file.


    If I change the TestMap Input to XML from Native, it looks at the file in the right place, but gives an error as it is expecting XML  Where the file is actually the EDI of the 856 want to map. 


    If I change te TestMap Input to generate instance, I get

    Invoking component...

    C:\Documents and Settings\cbeuker\Local Settings\Temp\inputfile.xml: error btm1037: Specified input file does not exist: The path is not of a legal form.

    Test Map failure for map file ..............


    Is this a bug?  Am I missing something.


    Thoughts, comments? 


    Thanks in advance


    Craig B.


    Friday, May 25, 2007 4:31 PM


  • I haven't heard back from the customer and I am unable to repro the above scenario hence closing this issue as resolved
    Monday, July 9, 2007 7:38 PM

All replies

  • From the generate instance statement, it looks like you are using Vista. Is that correct? Could you send out the instance and schema used in your test? I will try to repro this for you and get back to you soon.




    Tuesday, May 29, 2007 8:57 PM
  • HI

       I think there is a problem while your are setting the properties u need to set these also look at these and try




                                If not Firstly change these in map and then validate the instance and use that sample as input to map and test the map this 

                                 should work



    Thursday, May 31, 2007 5:45 AM
  • Greetings,


    No, I am working on Windows XP.


    Where would you like me to send the bundled files or should I just post them?

    Monday, June 4, 2007 10:56 PM
  • You can zip the project and mail it to me. My email is in my profile. Thanks
    Tuesday, June 5, 2007 7:24 PM
  • I haven't heard back from the customer and I am unable to repro the above scenario hence closing this issue as resolved
    Monday, July 9, 2007 7:38 PM
  • I am experiencing the same issue. My scenario is a little different. I am transforming an (unmodified) x12 856 (version 4010) schema to a custom XML schema which inserts via an updategram. The 856 test file does have the headers and footers making it a multi-transaction set, and I've got the X12_BatchSchema into play as well.


    I am able to parse and validate a test 856 file agaist the schema. I reference this same test file in my transform to test with. I've also created an instance against the 856 schema and tried testing it against the map as well.


    Regarding the inputfile.xml - My guess is during the map test, it actually does open my specified test file and the empty inputfile.txt file that is in the temp directory is just that, a temp file created during the validation. I'm also assuming that the reason it is blank is because, for some reason, the source isn't able to successfully transform to the target schema. I don't know exactly how the inputfile.xml file comes into play during all this, but that's my guess.


    Anyway, are there any suggestions to get this sample file to test successfully against my map?


    Also, I assume the actual 856 schema is my source schema in the map, even though I need X12_BatchSchema to parse the file since it contains the structure of a multi-transaction set? FWIW, I've been testing this map with a single transaction set sample so the X12_BatchSchema isn't needed, but the actual files being consumed will be multi-transactional.


    Thanks for any help,


    Friday, March 21, 2008 11:04 PM
  • crickets


    Friday, March 28, 2008 9:58 PM
  • Hello Mohsin,


    I am having a similar problem with test map. When I assign a native file as input instance for Test map I get the error below.

    error btm1044: Input validation error: Root element is missing.


    I clicked the input file the map creates and noticed that it was empty. Since the input is empty, the map did not work. I am not sure why the input file was empty. It seems like there is a problem converting the native edi file to xml.

    However, if I use an xml file as in input instance, Test Map works.


    Am I missing some code or component that is used to test native edi files within Biztalk Maps? Please help! Thanks so much.



    Tuesday, June 17, 2008 2:16 PM
  • This occurs in the situation described above.  The input.xml file being referred to is the temporary file created by the mapping engine when the native file is converted to EDI XML.  If there is a failure converting the file, the input.xml file will be empty (seems like the file is created before the EDI is validated).  When the map  then tries to read the input.xml file it finds no root node, producing the above error.


    To investigate this, validate the native instance against the X12 schema.  The validation should fail and produce errors indicating where the problem is.



    Thursday, June 19, 2008 6:00 PM
  • I have the same problem. I'm sure I"m inches away from getting this to work.

    I'm trying to map from EDI x12 4010 810 to XML.  I've cut it down to just mapping to a basic xml schema with only one element just for test.

    The EDI validates against the EDI schema but when I map I get that root element missing error.  It only works if I generate an XML file from the EDI Schema and map that.


    If I generate a native file it won't work and it doesn't work with any of my client's files in EDI format.


    Any suggestions would be greatly appreciated.


    Monday, October 13, 2008 3:21 PM
  • This is definitely a bug.  If both the source and destination schemas for your map that you are testing reside in the same project you are testing then the "test map" function will work fine, however, it will fail with the error "root elemet is missing" on the inputfile.xml if the source schema is an external reference.  You can try copying your source schema into yoru project for testing and remove it before you are deploying the project.
    • Proposed as answer by Hpriya Tuesday, May 26, 2009 7:11 AM
    Wednesday, December 24, 2008 4:06 PM
  • I have a similar scenario
    And by adding the schema within the same project i am able to test the map.
    Tuesday, May 26, 2009 7:12 AM