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

2004/08/06

Decompression pipeline component (zip files)

Ever wanted to unzip a file and use it's content in BizTalk Server? I've implemented an unzip component (disassembler stage) which uncompresses the files within the zip file and allows you to process them like you would normal messages. The sourcecode can be found here. I hope you enjoy this sample. Please let me know of any trouble with using it or any suggestions you might have!

22 Comments:

  • Hi
    I am trying to use your unzip component .. the component is added to the disassember stage. But after processing, I simply get the same source zip file in the output directory. The files are not unzipped ?
    Thanks

    By Anonymous Anonymous, at 12:10 AM  

  • Hi.. Figured out the previous problem. Though geting this error now:

    Source: "mscorlib" Receive Location: "C:\BTSTest\In\*.zip" Reason: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    Thanks

    By Anonymous Anonymous, at 12:24 AM  

  • Please try and debug the component by attaching to btsntsvc.exe before dropping the document in the receive location.

    By Blogger Martijn Hoogendoorn, at 10:44 AM  

  • The problem was with small zip files .. with larger files, works correctly (though I couldnt debug due to Whidbey and all).

    By Anonymous Anonymous, at 9:06 PM  

  • how about flat files? i have a zipped flat file that i want to read in, unzip and disassemble in the sample pipeline. i'm having some trouble with this. i thought that the pipeline can be configured to execute the disassemble components in sequence however if i include both the unzipComponent and a flatfile disassembler i get an error. i'm finding that i'm having to have second pipeline to with the flatfile disassembler but i would like to keep it as stateless as possible without having to have a file location to dump the unzipped file out and then pickup again with a second port. an ideas?

    By Blogger Sean Rock, at 12:52 PM  

  • Try changing the attribute on the class from:

    ComponentCategory(CategoryTypes.CATID_DisassemblingParser

    to:

    ComponentCategory(CategoryTypes.CATID_Decoder) or ComponentCategory(CategoryTypes.CATID_Any)

    in order to enable putting the component in another stage. I errornously choose the worst pipeline stage to put this component in, as it's the only stage with an "First Match" execution mode instead of "All". Sorry for any confusion!

    By Blogger Martijn Hoogendoorn, at 9:04 AM  

  • When I am trying to use the unzippping component inside the disassembler stage of the receive pipeline, the file is picked up but an error is shown in the HAT like "Could not find a matching subscription for the message".

    Please help.

    thanks in advance,
    GK

    By Blogger GK, at 3:15 PM  

  • This post has been removed by a blog administrator.

    By Blogger GK, at 3:15 PM  

  • hi Martijn,
    do you have biztalk sample where input file is in zip format ftp to biztalk.
    biztalk will pick up file using ftp adapter and custom pipline will unzip the file and process through orchestration.

    thanks
    D patel

    By Blogger d patel, at 6:18 AM  

  • hi Martijn,
    do you have biztalk sample where input file is in zip format ftp to biztalk.
    biztalk will pick up file using ftp adapter and custom pipline will unzip the file and process through orchestration.

    thanks
    D patel

    By Blogger d patel, at 6:19 AM  

  • This post has been removed by a blog administrator.

    By Blogger Adam Zastawski, at 12:00 AM  

  • FYI. As of Nov 15, 2005, your link is dead.

    By Anonymous Anonymous, at 10:14 AM  

  • I am unable to download ur code. Could you send this code at my mail id narang_mohit@rediffmail.com

    By Anonymous Anonymous, at 3:02 PM  

  • I m unable to download your code. Could you send me ur code at narang_mohit@rediffmail.com

    By Anonymous Anonymous, at 3:04 PM  

  • Based on martijn code (unzip part).
    I build the half (zip part)

    http://www.gotdotnet.com/workspaces/workspace.aspx?id=ab5544dc-6d5c-4ffa-8ab9-e3dd4954c0cf

    Go there and download the zip/unzip pipeline components

    By Blogger hung, at 11:40 PM  

  • Marijn,
    The post build event in the solution that is deployed on GotDotNet contains an unquoted copy command:
    copy $(TargetPath) "c:\program files\microsoft biztalk server 2004\pipeline components"

    Of course this will fail if you have spaces in the solution path, so I changed it to:
    copy "$(TargetPath)" "c:\program files\microsoft biztalk server 2004\pipeline components"

    Thanks,
    Tom Canter

    By Anonymous Anonymous, at 5:48 PM  

  • Hello,

    Could you please let me know if there is any way to FTP a zip file using the FTP adapter - biztalk 2006?

    Thanks
    NReddy

    By Anonymous Anonymous, at 9:44 PM  

  • Hi,

    I'm wanting to use your Unzip component and need direction on the best way to get the required results. I'll be receiving a password protected zip file with two text documents and two csv. I would like to use your component to unzip the files, but I'm not sure where would be best to delete the two text files. rename the csv to text and append them into one file. Should i do all this in your Custom component or in a Biztalk Orchestration. Please be advised that i new to Biztalk and C# development.
    Thanks and regards
    Rob

    By Anonymous Anonymous, at 1:07 AM  

  • I need to have a component to unzip the zip file that has only one xml doc , but that should be in the decode level , has i have other component in the disassember stage and my customer dont want to combine both of them.
    if any one have plz ping me at ranadheer.thouti@gmail.com

    By Blogger Ranadheer Reddy, at 10:14 AM  

  • This momentousdecree wow gold came as a great beacon gold in wow light of hope buy wow gold to millions of negroslaves wow gold kaufen who had been seared in the flames of withering injustice.maplestory mesos it came as a joyous daybreak to end the long night ofcaptivity.but one hundred years later,maplestory money we must face the tragic fact thatthe negro is still not free.maple money one hundred years later,sell wow gold the lifeof the negro is still sadly crippled by the manacles ofsegregation and the chains of discrimination. one hundred yearslater,maple story money the negro lives on a lonely island of poverty in themidst of a vast ocean of material prosperity.wow powerleveling one hundred yearslater,maple story power leveling the negro is still languishing in the corners of americansociety and finds himself an exile in his own land. so we havecome here today to dramatize wow powerleveln an appalling condition.in a ms mesos sense we have come to our nation''s capital to cash a check.when the architects of our republic wow powerleveln wrote the magnificent wordsof the constitution and the declaration of independence, theywere signing a promissory note maplestory power leveling to which every american was tofall heir. this note was a promise that all men would beguarranteed the inalienable rights of life, liberty, and thepursuit of happiness.it is obvious today that america has defaulted on thispromissory note insofar as her citizens of color are concerned.instead of honoring this sacred obligation, america has giventhe negro people a bad check which has come back markedinsufficient funds.justice is bankrupt. we refuse to believe that there areinsufficient funds in the great vaults of opportunity of thisnation. so we have come to cash this check -- a check that willgive us upon demand the riches of freedom and the security ofjustice. we have also come to this hallowed spot to remindamerica of the fierce urgency of now

    By Blogger ghkj, at 3:02 AM  

  • They will miss the ro zeny and they will try their best to play this game to get the joy. As long as they earn the ragnarok zeny they will be happy and they think the game is very interesting. Of course they have to have a lot of iro zeny by themselves. Sure, that process of achieving will have its unpleasant and disagreeable aspects.I am lonely so I play the game and go to earn ragnarok online zeny to give my friends. They also give me a lot of cheap zeny while playing the game.

    By Anonymous Anonymous, at 1:24 AM  

  • Though at work with zip files there is good tool-repairing broken zip,I said about it,because program has many other facilities,also it is free as far as I can see,yet tool can save a lot of free space on your HDD, when applied to files, that are used rarely,program is so easy to use, that it does not require any technical skills, anyone, who knows Windows interface, can work with this tool,supports Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows XP SP2, Windows 2003 and Windows Vista,program is very powerful, it contains several different algorithms, developed in our company, for accurate data recovery,repair zip file broken and repair broken zip file does not modify source file during the process, so, you can take it and try to recover with any other Zip repair service and compare the results.

    By Blogger Alex, at 7:46 PM  

Post a Comment

Links to this post:

Create a Link

<< Home