Feed Icon  

Contact

  • Bryant Likes
  • Send mail to the author(s) E-mail
  • twitter
  • View Bryant Likes's profile on LinkedIn
  • del.icio.us
Get Microsoft Silverlight
by clicking "Install Microsoft Silverlight" you accept the
Silverlight license agreement

Hosting By

Hot Topics

Tags

Open Source Projects

Archives

Ads

Testing Custom Flat File Disassemblers

Posted in BizTalk | Test-Driven Dev at Sunday, May 15, 2005 4:01 PM Pacific Daylight Time

At my current project for Avanade I've been working with Hisham (who is also my Career Manager and whose blog I read before I even knew about Avanade) and we've been doing a lot of BizTalk stuff. As he stated here, BizTalk development, without the help of some external tools, can be very time consuming just in the build->deploy->bind->enlist->start process of running BizTalk. One of the pieces that I've been working on is a custom Flat File disassembler. I found that testing my component within BizTalk was very time consuming. I also knew that there was a utility in the SDK for testing flat file disassembly (FFDasm.exe) which uses the standard flat file disassembler (FFDasmComp). So, with a little help from Reflector, on my flight to Seattle I hacked together a new version of the utility (FFDasmEx.exe) which accepts an additional parameter for the name of the custom pipeline component that you would like it to use instead of the standard disassembler.

This makes testing a breeze as you can simply compile your pipeline component assembly, copy it to the Pipeline Components folder, and then run your test. You can easily debug your component using this same method but running the FFDasmEx project in debug mode.

If anyone is interested let me know and I'll zip up the project and post it somewhere. However, if you have a copy of Reflector you can probably put it together yourself in about ten minutes.

Wednesday, March 8, 2006 5:52:25 AM (Pacific Standard Time, UTC-08:00)
Hi,

I have a very similar situation. I am having a very hard time loading a schema dynamically. I tried to follow your above instructions. Looks like I am missing something small. It stopped me for almost a week now. The goal is as following:

1. I have my flat file schema built into one assembly.
2. From another custom pipe line component assembly, I am trying to load the flat file schema at run time. ( To be more specific I get a SOAP request to my pipeline and I have to locate flat files specified in SOAP message and load the flat files (there could be many) dynamically and apply flat file schema to map them).
I wrote a custom wrapper to flat file disassembler. For some reason I get the COM exception which does not tell me much.

Message = "80004005: Error HRESULT E_FAIL has been returned from a call to a COM component."

I tried multiple ways, and I get the above error code in all the cases:

Case (1):
Assembly assembly = Assembly.LoadFile(@"D:\BTSProjects\..\bin\Development\XXX.Schemas.dll");
Type type = assembly.GetType("XYZ.ABC_FF");
PropertyInfo schemaInfo = type.GetProperty("Schema");
object instance = assembly.CreateInstance(type.FullName);
SchemaWithNone xmlSchema = (SchemaWithNone)schemaInfo.GetValue(instance, null);
return xmlSchema;

... I don't know how to load XmlSchema into SchemaWithNone ?

Case (2):
SchemaWithNone schemaWithNone = new SchemaWithNone("http://XYZ.ABC_FF");
schemaWithNone.AssemblyName = "XXX.Schemas";
schemaWithNone.DocSpecName = "http://XYZ.ABC_FF";
schemaWithNone.RootName = "Body";
schemaWithNone.TargetNamespace = "http://XYZ.ABC_FF";
return schemaWithNone;

I don't know what I am missing here. Kindly help me out.

Thanks alot.
Kishore
(kishoredharanikota@yahoo.com)
Kishore Dharanikota
Sunday, May 21, 2006 4:27:31 PM (Pacific Daylight Time, UTC-07:00)
Can you send me the project file to skodoth@apl.co.nz
Sujesh
Comments are closed.