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!

21 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  

  • This comment 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  

  • 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  

  • This comment has been removed by the author.

    By Blogger Alexis, at 5:16 PM  

  • Yesterday I downloaded an interest fim,but zi archive was damaged and I started to solve this situation.Fortunately I found-fix a zip file-at one forum.Tool helped me in a minute and free of charge!!! Besides that software showed how recovers information from damaged zip files and minimizes data loss during the zip recovery process.

    By Blogger Alexis, at 5:17 PM  

  • Today I opened my folder with mp3 files and wanted to play on of it.But the song,exactlier zip file,which I choiced was corrupted.I used the google and saw there-fixing read error in winzip file.Application solved my issue quite easy and for free.Besides I saw how utility ecovery algorithms of fix valid archive error winzip, that are used simultaneously.

    By Blogger Alex, at 6:06 PM  

  • Interesting layout on your blog. I really enjoyed reading it and also I will be back to read more in the future.

    By Anonymous Gadgets UK, at 9:55 AM  

  • Thanks you. Very good post.Unless they can offer a really compelling reason for users to come back, it will be the next Bebo, MySpace

    By Anonymous Cannon 10755GF, at 11:27 PM  

Post a Comment

<< Home