Martijn's blog - E-Commerce, EAI, BizTalk and .NET

2004/09/30

Testing the unzipcomponent sample

Recently, some people have requested a usage example of the UnzipComponent pipeline component example posted here. I've create a sample solution, containing the UnZipComponent itself and a BizTalk project consisting of a simple receive pipeline witht the UnZipComponent in it.

The UnZipComponent uses a build action to copy itself to "C:\Program Files\Microsoft BizTalk Server 2004\Pipeline Components", so if you have installed BizTalk Server 2004 somewhere else, please alter the location by right-clicking the project, choosing "Build Events", navigating to "Post-build Event Commmand Line" and pressing the three dots button on the right.

A binding file has been included which you can import with the BizTalk Deployment Wizard or from the command-line using "btsdeploy.exe" from the BizTalk Server 2004 installation folder.

The binding file contains folder references, which probably don't match your testbed setup. Alter them after importing them by using BizTalk Explorer (whichever version :p)

The sample project does nothing other than decompressing the inbound zipfile and submitting 1 message for each file within the zipfile. I've included a file called "test.zip", which contains 2 simple XML files consisting of very interesting data, which will be put into the output folder configured. Nothing else.

UPDATED: NEW DOWNLOAD LOCATION

The sample project can be found here. (Don't forget to alter the AssemblyInfo.cs and project properties of the BizTalk project to refer to your own strong name key file.)

Please remember that the btsntsvc.exe process (the BizTalk service) locks the pipeline component when in use. So if you alter anything, stop the service, compile and start the service, otherwise the post-built event will fail)

One more thing... Pipeline components should normally not be within the same solution as the projects that use these components, as the components get loaded by the pipeline designer and locked, so compilation would become rather hard...

Hope you enjoy this!

6 Comments:

  • i'm sure this works but i'm buggered if i can get it to work. i continually get this error in hat:

    Could not find a matching subscription for the message. The message engine failed to process a message submitted by adapter:FILE Source URL:C:\test\in\*.zip. Details: Could not find a matching subscription for the message. This error occurs if the subscribed orchestration schedule or send port has not been started, or if some of the message properties necessary for subscription evaluation have not been promoted. Please refer to Health and Activity Tracking tool for more detailed information on this failure.

    :(

    By Blogger Sean Rock, at 9:26 PM  

  • Please send me your solution and support files to http://martijnh.blogspot.com/2004/07/e-mail-address.html and I'll have a look at it :-)

    By Blogger Martijn Hoogendoorn, at 10:40 AM  

  • I was using the sample project from your site.

    By Blogger Sean Rock, at 4:31 PM  

  • ah! sorted it. i wasn't setting up the subscription on the send port (as the error kept telling me!). thanks - great component!

    By Blogger Sean Rock, at 5:13 PM  

  • Hi Martijn

    I have used the sample - it works great. Thanks

    Still, I do have a problem:
    When Im using CBR it's working.
    but, When Im using orchestration
    Im getting the following error:
    Could not find a matching subscription for the message. The message engine failed to process a message submitted by adapter....
    I think that the code didn't set the message-type on the
    message-context.
    If so...

    How and when should I set the MessageType [on message context]?

    If you think this could be other problem - I'l be more then happy to here your suggestions?

    Thanks.

    By Anonymous Anonymous, at 6:17 PM  

  • Hi,

    New insight taught me the component actually shouldn't be a disassembler. Refactor the code to be placed in a different stage (the Decode stage) and let the XmlDisassembler (or any other disassembler component) do the job for you, the MessageType will be set by the disassembler component. If you need more help, let me know, I'll be able to refactor the component for you, but I'm quite busy at the moment ;-o

    By Blogger Martijn Hoogendoorn, at 9:22 PM  

Post a Comment

<< Home