Generating Schema in BizTalk using existing XDR or XML file (error resolution)

Many times you don’t create message schema from scratch. Instead you try to generate schema using some existing DTD, XDR or even sample XML file. Recently, I was trying to generate schema using XDR and sample XML file and ran into small irritating problems. This encouraged me to share solution for them with you.

I right clicked on project to select “Add Generated Item” menu. Then I selected “Generate Schema” option on next screen and start using it. First message I got that I need to run “InstallWFX.vbs” script file (located in InstallDir:\Program Files\Microsoft BizTalk Server 2006\sdk\Utilities\Schema Generator” folder) to install necessary prerequisite to use this tool. This was informative message and I did the same. Just for information, you need to run “InstallDTD.vbs” script file to install necessary prerequisite to generate schema using DTD file.

After running “installWFX.vbs” script, I was expecting smooth sailing but I was bugged with an error message. Something like - “Could not find file or assembly Microsoft.BizTalk.TOM … “. It was little weird to see this error because this dll was already present in machine.

I looked for similar error on net and even in BizTalk documentation but could not find one. I was making hit and try. And finally; following steps made schema generation tool run –

· I searched for “Microsoft.BizTalk.TOM .dll” assembly on machine.

· Used “gacutil” to register this assembly in GAC

· Finally executed “InstallWFX.vbs” script again.

Sometime small issues create big hurdle in development and especially when you don’t find remedy for them anywhere. Hope you find this useful.