Zipping files/Compressing files in BizTalk 2010

Hi all!
I have a BizTalk solution that needs to pick up all files in a directory, zip them up, and send them to a customer. I'm using BizTalk 2010.
I tried using a 3rd party adapter I found on CodeProject but it would not work reliably. Are there other options out there for BizTalk 2010?

Hi Sean,
Check out the article,
http://social.technet.microsoft.com/wiki/contents/articles/11679.biztalk-list-of-custom-pipeline-components.aspx  here you will find zip pipeline component.

Similar Messages

  • Duplicate File issue using FTP adapter - BizTalk 2010

    Hi We encountered an Issue of picking Duplicate files in BizTalk 2010 from the FTP Location. Need your assistance on this.
    Mainframe sends multiple files a 0 KB file to FTP and BizTalk picks during a particular service window using FTP Adapter. 
    Receive Location has a pipeline component which decodes the MF file(EBCDICRow format). 
    Send Port transmits the file which is decoded in the Receive location. There is no mapping or orchestration involved. 
    When 2 files are placed in FTP Location. BizTalk Transmits the files successfully
    No suspended messages in BizTalk but we see below error in event log. we tried reproduce the issue but no luck. 
    Host Instance running FTP Location is Clustered  
     There was a failure executing the receive pipeline: "XXXX.XX.Pipelines.Receive_XXX_TransactionsMC_passthru, XXX.XX.Pipelines, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c2d1f476d5c2f97d"
    Source: "EbcdicRowDeCode" Receive Port: "XXX.XX.MCSTransactionsMC" URI: "ftp://XXXXXXXX:21/'XXXX'/MCSDT.DEFKOP.R001.D*.T*" Reason: Unable to cast object of type 'Microsoft.BizTalk.Streaming.BasicStreamWrapper' to type 'XXX.BizTalk.Pipeline.Components.Streams.V3.VirtualStream
    MF Puts below Files at FTP Location
    PSNOX.MCSDT.DEFKOP.R001.D150406.T009000
    PSNOX.MCSDT.DEFKOP.R001.D150406.T002100
    BizTalk Picks ( at specified Service window) and Transmits as 
    PSNOX.MCSDT.DEFKOP.R001.D150406.T009000
    PSNOX.MCSDT.DEFKOP.R001.D150406.T009000
    PSNOX.MCSDT.DEFKOP.R001.D150406.T002100
    Regards
    -Sri

    Hi Sri,
    There could be two reason for such a behavior:
    1) Using Non-Clustered Hosts: It is always recommended to use the clustered host for FTP adapter. Because FTP don't allow
    any locking mechanism on the files so in case of non-clustered with multiple host instances you might receive same file multiple times through different host instances.
    2) If the original document is still being written to the FTP server by the host application, the FTP adapter cannot
    delete the document and will retrieve another copy of the document at the next polling interval that is configured for the receive location. This behavior causes document duplication to occur. 
    Workaround could be:
    Configure the host application to write to a temporary folder on the same hard disk as the public FTP folder and to periodically move the contents of the temporary folder
    to the FTP folder. The temporary folder should be on the same hard disk as the public FTP folder to make sure that the move operation is atomic. An atomic operation is an operation that is functionally indivisible. If you write data to the public FTP folder
    by using the BizTalk Server FTP adapter, you can do this by specifying a Temporary Folder property in the FTP Transport Properties dialog box when you configure a send port. If you specify a Temporary Folder property, make sure that this folder is on the same
    physical disk as the public FTP folder.
    Configure the FTP receive location to operate within a service window when the host application is not writing data to the FTP server. You can specify the service window
    when you configure the receive location properties.
    Refer: Known Issues with the FTP
    Adapter
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Search Server is unavailable and could not be accessed While crawling .zip files

    I Have Search Service Application running in one of the Application Server in my Farm. I am using Continuous Crawl to Crawl My Local SharePoint Site Content Source. Today I looked at SearchServiceApp:CrawlLog-URl page and Found out following error message
    was encountered while crawling .zip files in the document library of a site.
    I checked my list of Allowed File types .zip is listed

    Hi octopus,
    According to your description, my understanding is that you got an error when you crawl zip files in SharePoint 2010.
    Whether this error occurred for all zip files in the entrie farm.
    Please disable the authentication loopback, then do a full crawl, compare the result.
    For disabling the authentication loopback, you can do as the followings:
    Click Start, click Run, type regedit, and then click OK.
    Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    Right-click Lsa, point to New, and then click DWORD Value.
    Type DisableLoopbackCheck, and then press ENTER.
    Right-click DisableLoopbackCheck, and then click Modify.
    In the Value data box, type 1, and then click OK.
    Exit Registry Editor.
    Restart the computer.
    Here are two similar posts for your reference:
    http://sharepoint-kit.blogspot.jp/2013_08_01_archive.html
    http://suryapulipati.blogspot.jp/2013/10/the-sharepoint-item-being-crawled.html
    If this issue still exists, please check the log file to find more information about this issue. The path of the log file is: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Reading a Compressed File from a ZIP File, which is an entry of ZIP File

    Hello, Experts,
    Would it be possible somebody to help me with code example for the following problem?
    I want to read a compressed file from a ZIP file, which is an entry of ZIP File, without extacting/writing files on file system. Is this possible?
    Lets say we have a ZipFile1. There is ZipFile2 inside ZipFile1. And inside ZipFile2 is FileA. The scenario is reading FileA without extracting on file system.
    Thank you in advance for your help.
    Cheers
    RADY

    The classes you want to be using are java.util.zip.ZipInputStream and and ZipEntry from the same package. Construct the ZipInputStream with the input you have for the outer zip. Loop with ZipInputStream.getNextEntry until you find the inner zip you're looking for - that method returns a ZipEntry, and you get the name of the zip entry with ZipEntry.getName. Read the ZipInputStream from that point into some buffer, and read that buffer into a new ZipInputStream - rinse and repeat until you have the contents of the file in the zip in the zip...

  • Problem with compressing unicode file names in zip file

    Hi Everyone,
    I have a problem while compressing the unicode file name in a zip file. I used the below code for compressing the unicode files.
    String[] source = null;
    // C:\\TestData\\unicode_filename.txt :  unicode_filename.txt is the file created in japanesse language
    source = new String[] {"C:\\TestData\\temp_properties.xml","C:\\TestData\\unicode_filename.txt" };
    byte[] buf = new byte[1024];
    // Create the ZIP file
    String target = "C:\\TestData\\target.zip";
    ZipOutputStream out = new ZipOutputStream(new FileOutputStream(target));
    // Compress the files
    for (int i = 0; i < source.length; i++)
         FileInputStream in = new FileInputStream(source);
         // Add ZIP entry to output stream.
         String fileName;
         File tempFile;
         ZipEntry zipEntry = new ZipEntry(source[i]);
         fileName = zipEntry.getName();
    zipEntry = new ZipEntry(fileName);
    zipEntry.setMethod(ZipEntry.DEFLATED);
    getUTF8Bytes(source[i]);
    // here I'm unable to find the unicode files and not able to understand.
    out.putNextEntry(zipEntry);
    // Transfer bytes from the file to the ZIP file
    int len;
    while ((len = in.read(buf)) > 0) {
    out.write(buf, 0, len);
    // Complete the entry
    out.closeEntry();
    in.close();
    // Complete the ZIP file
    out.close();Please help me how to fix this issue.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    Thanks for your time for looking into my query.
    Please check the below code for debugging the issue and throw your comments/suggestions for fixing the issue.
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    public class ZipTest
      public static void main(String[] args) {
              String[] source = new String[] {"C:\\TestData\\APP_Properties.xml","C:\\TestData\\??.txt" };
              byte[] buf = new byte[1024];
              try {
                   // Create the ZIP file
                   String target = "C:\\TestData\\target.zip";
                   ZipOutputStream out = new ZipOutputStream(new FileOutputStream(target));
                   // Compress the files
                   for (int i = 0; i < source.length; i++) {
                        FileInputStream in = new FileInputStream(source);
                        // Add ZIP entry to output stream.
                        String fileName;
                        File tempFile;
                        ZipEntry zipEntry = new ZipEntry(source[i]);
                        fileName = zipEntry.getName();
                        zipEntry = new ZipEntry(fileName);
                        zipEntry.setMethod(ZipEntry.DEFLATED);
                        getUTF8Bytes(source[i]);
                        out.putNextEntry(zipEntry);
                        // Transfer bytes from the file to the ZIP file
                        int len;
                        while ((len = in.read(buf)) > 0) {
                             out.write(buf, 0, len);
                        // Complete the entry
                        out.closeEntry();
                        in.close();
                   // Complete the ZIP file
                   out.close();
              } catch (IOException e) {
                   e.printStackTrace();
         private static byte[] getUTF8Bytes(String s) {
              char[] c = s.toCharArray();
              FileOutputStream file;
              try {
                   file = new FileOutputStream("C:\\TestData\\output.txt", true);
                   int len = c.length;
                   // Count the number of encoded bytes...
                   int count = 0;
                   for (int i = 0; i < len; i++) {
                        int ch = c[i];
                        if (ch <= 0x7f) {
                             count++;
                        } else if (ch <= 0x7ff) {
                             count += 2;
                        } else {
                             count += 3;
                   // Now return the encoded bytes...
                   byte[] b = new byte[count];
                   int off = 0;
                   for (int i = 0; i < len; i++) {
                        int ch = c[i];
                        if (ch <= 0x7f) {
                             b[off++] = (byte) ch;
                             file.write((byte) ch);
                        } else if (ch <= 0x7ff) {
                             b[off++] = (byte) ((ch >> 6) | 0xc0);
                             file.write((byte) ((ch >> 6) | 0xc0));
                             b[off++] = (byte) ((ch & 0x3f) | 0x80);
                             file.write((byte) ((ch & 0x3f) | 0x80));
                        } else {
                             b[off++] = (byte) ((ch >> 12) | 0xe0);
                             file.write((byte) ((ch >> 12) | 0xe0));
                             b[off++] = (byte) (((ch >> 6) & 0x3f) | 0x80);
                             file.write((byte) (((ch >> 6) & 0x3f) | 0x80));
                             b[off++] = (byte) ((ch & 0x3f) | 0x80);
                             file.write((byte) ((ch & 0x3f) | 0x80));
                   file.write((byte) '\n');
                   file.write((byte) '\r');
                   file.flush();
                   file.close();
                   return b;
              } catch (FileNotFoundException e1) {
                   e1.printStackTrace();
              } catch (IOException e1) {
                   e1.printStackTrace();
              return null;
    }Thanks
    Aravind                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Attachment File non-English Name DISAPPEARS problem in BizTalk 2010 SMTP Adapter

    Hello ,
    I'm using BizTalk 2010 SMTP Adapter for sending mail with attachments by setting them via property SMTP.Attachments
    //Attachment
    msgEmail(SMTP.Attachments)= AttachmentList;
    I have files in several languages (In English and in Russian partialy) for the example
    My attachment list looks like this:
    "C:\Temp\Files\EnglishNameFile.xml | C:\Temp\Files\RussianFileName_РусскоеИмя.xml";
    After the sending Mail with this attachments the second file (it's name partialy in Russian) received without this part name
    (The non-english part of name is DISAPPEARS)
    like this: 
    RussianFileName_.xml ( must be RussianFileName_РусскоеИмя.xml)
    The NON-English part is DISAPPEARS!!!
    And if i have file that doesn't have latin latters (non-english) at all  than BizTalk SMTP Adapter change name
    to default one like ATT41233.xml
    I found this behaviour occur in other non-english languages also!!!
    Unfortunately i'm not found any info about this
    Any help would be very
    much appreciated
    Vadim

    Refer to this link -
    http://social.msdn.microsoft.com/Forums/en-US/163a47cf-db31-49a5-9ee3-ce9272ba24ff/setting-contenttransferencoding-in-dynamic-smtp-port?forum=biztalkgeneral
    There is an option of the Multipart message that controls the filename and the charset used to control how the attachment is treated, including content-transfer encoding.
    Regards.

  • Prefer photos compressed in zip file rather than imbedded in email

    My daughter sends me pictures of our granddaughter using her Powerbook, iPhoto, and Apple Mail app. I use AOL for my regular mail. Mail seems to automatically imbed the pictures in the body of the email. If she sends a large number of pictures, even properly resized for email, it takes forever for these files to open in the body of the email. I received an email with 16 pictures and it took nearly ten minutes to open, and AOL kept warning me it was overloaded. Is there any way to use Apple Mail and have the pictures zipped?
    ds

    As I mention in a post to HTML question in this forum, I believe the only thing that distinguishes "embedded" from "attached" images is some tags in the message -- it really doesn't make much sense to talk about them as separate files until something processes them into such after receiving what is really a single transmitted message.
    IOW, Mail (& every other MIME-compliant sender app) always sends the pictures in the email itself, so it is a question of which tags it uses with them & how processes use them that determines what you see at the receiving end. Ideally, the only processing occurs at the receiving end, but in reality the servers may apply processes before final transmission to the addressee. For example, many free email services insert promotional ad blurbs into the body of the message. A few, particularly AOL, can strip the non-text content off the message as a parental control feature or at the request of client software & deliver (or not deliver) it as individual files, sometimes substantially altering the content or encoding as yet another "feature" of the service.
    Long time AOL users may have noticed such things in the pre-OS X days -- if you sent multiple attachments via the old AOL client, it would automatically convert them to a .sit file for uploading & (in theory at least) AOL would automatically serve them as .sit files to Mac clients & .zip files to PC clients. (What David S. sees now with the OS X AOL client is the equivalent of that, less the conversion between .zip & .sit.) Using the AOL client also used to -- & maybe still does -- change some file associations so that the "owner app" (the default app that opens the file) is the AOL client.
    If you have the Mac AOL client installed, you may notice that it is on the list of "open with" apps for many, many file types. Ironically, it is happy to open & play System 7 sound files & will become the default for opening them since OS X doesn't by default provide any app that registers with launch services to do this. Similar things happen with other file types, particularly those that are common with PC's but less so with Macs, or are basically proprietary versions of compression formats licensed by the once-mighty AOL & still floating around the web because their use is as free as all those AOL client disks it was once impossible to avoid. (For example, if you occasionally want to compress files into .sit format & don't feel like paying for Stuffit, you can do so with the AOL client.)
    Anyway, the point is once you involve the AOL client in the equation, you can no longer be sure what you send is what a recipient will receive, over & above whatever the client email app does to process the message, or anything else that occurs after a message is sent.
    In my experience, the best approach for images or anything else you want to arrive unaltered is to first "encapsulate" every file into a single zip file with the Finder (actually BOMArchiveHelper, if you want to be technical about it), & then attach that to your email. This pretty much keeps services from mucking with it in any way: even if they split it out from the text of the message, they treat it as one, non-graphic file that can't be displayed inline, no matter what the tags or anything else say they can do with it.

  • Compress/zip files from the command line in Windows 7?

    In Windows 7 is there a native way to compress or zip files from the command line?  I'd like to do it without installing any third-party utilities such as 7Zip.

    I fully agree that Compact is not the answer. There are additional concerns with the Compact command. It enables disk compression which is a total no-no. Very bad! It makes your computer very slow and is quite difficult to undo. The only time anyone should
    use this command is when they're removing disk compression because someone turned it on to save space.  Turning this off has to be done by booting into the recovery console, if my memory serves me correctly, and it's a real nuisance.  So
    definitely no to the Compact command.
    If you wanted to compress files before sending them to another drive, or over a network, or by email, then Compact wouldn't actually help at all because the files have to get uncompressed whenever they're accessed, especially before sending them anywhere. 
    When I say accessed, I mean that just looking at a file triggers the OS to decompress it in the background and present you with an uncompressed version of it then letting you change it and recompressing it again for storage every single time you access the
    file, which is why your machine gets slower.  If you have folders or files that have blue text instead of black, then you've probably already made this mistake.
    I would also like to know if there is a built-in command for zipping files/directories, or, if there isn't such a thing built into Windows, then I would like to know if this is feature is accessible through Visual Studio, which would be just as good as having
    a command-line program for those of us that do a bit of programming.
    If anyone knows if MS provides such a feature, either by command-line or through an API, then I'd love to hear about it.  Good luck to those of you that have disk compression turn on.

  • Download report as compressed/zip file

    Hi,
    i was wondering if it is possible to download a report compresed/(zip file). Some reports are more then 10MB and it's sometimes timeconsuming to download it to you local machine via a slow internet connection. If this is possible.. Is it then also possible to create an Ibot to sent a zipped report to mail :)
    regards,
    Osman

    I don't think you can compress a file or zip it and then download it. But you can schedule an ibot to download the file to a local drive using javascripts at night when no one is around and it doesn't matter how long it takes. Then, if you need to email them out, you can zip them there and email them. Here are some links that will help you with the javascripting:
    http://oraclebizint.wordpress.com/2007/12/17/oracle-bi-ee-101332-calling-java-scripts-and-java-classes-from-ibots/
    http://sureshotstrategies.wordpress.com/2008/04/12/writing-ibots-results-to-a-file/

  • What application do I use to open compressed zip files?

    Hi!
    I am wondering what application I use to open a compressed zip file?
    Thanks.

    Normally you just double-click on them and they open!  The application that does this is "Archive Utility".  Located in /System/Library/CoreServices .
    charlie

  • Zip files Exceedingly compressed size message of 30 megabytes are quarantined

    I get this message when I received a zip file over 30 megabytes.
    FILE QUARANTINED
    The original contents of this file have been replaced with
    this message because of its characteristics.
    File name: '172-16-1-4-04SEP14.ZIP'
    Malware name: 'Exceedingly compressed size'
    I have 3 question
    1. How do I turn off the function in Exchange 2013 of blocking ZIPs over 30 megabytes?
    2. Where is the "quarantine" located that the error message is referring to?
    3. If I want to how can I raise the value to 50 megabytes?
    Please do not post information about Forefront on this. This is not a Forefront problem
    Moses Hull of Alexant Systems

    Hi,
    Please check if the below information helps.
    Maximum attachment size in Transport rules that apply to all Mailbox servers in the organization can be created, set and viewed using below command
    Cmdlets to set: New-TransportRule, Set-TransportRule
    Cmdlets to Get: Get-TransportRule
    Parameter: AttachmentSizeOver
    Or in EAC
    Mail flow > Rules > Add
    or
    Edit .
    Use the predicate Apply this rule if > Any attachment >
    is greater than or equal to
    Use the predicate Apply this rule if > The message >
    size is greater than or equal to
    Refer
    http://technet.microsoft.com/en-us/library/bb124345(v=exchg.150).aspx

  • Compressing a folder creates two zip files

    I've got a folder called Blanks/ABC FM/SMS/Other and when I compress it I get two zip files of the same size: one with the correct name and the other called Archive.zip. When I remove the space I only get the Archive.zip. When I remove the slashes I get the correct zip file only.
    Is this a bug that I should report? How?

    If you were expecting C/D to compress to C/D.zip instead of Archive.zip I think I have an explanation for that.
    The unix file system which is the underlying OSX file system uses slash (/) as a path delimiter.  So to use an example like yours, if you create a folder A on the desktop and B within A then that the pathname is A/B.  But in reality, being on your desktop it is /Users/you/A/B, where you is your user id.
    The finder tries to allow as many characters as it can for filenames.  But the slash it cannot allow in a filename when recorded in the file system.  So what it does is actually change the slash to a colon in the actual filename.  Thus the filename "A/B" in the finder is, in reality, "A:B" in the file system.
    I think this colon-equals-slash naming convention is what causing the finder's Compress to treat the name specially and it just changes it the output to be the generic Archive.zip.
    Compress is there as a convenience.  There's lots of other ways to do zips.  There's third party utilities.  There's zip command in the terminal (where you can play the finder's game and generate A:B.zip so that it displays in the finder as A/B.zip).

  • Outlook 2010 can't open zip files in public folders.

    The temp folders are empty.  This is a new install.  

    This is very odd.  I have a new install of Win 7 with Outlook 2010 and I can't open a zip file attached to an email in a public folder.  It is not isolated to a single zip file, machine or user either.  I can open .pdf, xls, .txt and others OK.
    Ideas? 
    Thanks!
    This topic first appeared in the Spiceworks Community

  • Can I delete files once I compress them into a zip file?

    I am trying to get more space in my hard drive. One of the suggestions is to compress files I don't use. Once I compress them into an archive zip file, it looks like the files are still there.  I'm thinking that I should delete the original files but am afraid to do so. What percentage space do I save when I compress?

    What percentage space do I save when I compress?
    That depends on the type of file. Files that are already compressed, such as most media files, won't get smaller, and they may get larger. Text files will compress by about half, on average, but that will probably save a negligible amount of space.
    The right solution to your problem is to move the files you don't often need to an external hard drive. That drive must be backed up along with the internal one.

  • Compress KM documents in a ZIP file

    Hi everyone,
    Someone has already developed a program that lets compress KM documents in a ZIP file?
    Thanks & regards
    Hassan

    GaryJSF wrote:
    Hi,
    I have code similar to the one below and it is working but I would like to add a directory to the zip file to do something like:
    test.zip
    Folder1
    file1
    file2
    Folder2
    file3
    Zip files don't use a folder structure per-se, they use slashes to delimit path segments:
    ZipEntry entry = new ZipEntry("Folder1/");
    ZipEntry entry = new ZipEntry("Folder1/file1"); //etcTry it and if you have trouble come back and ask insightful questions.
    Edited by: endasil on 7-Oct-2009 2:11 PM

Maybe you are looking for

  • SSRS - Export multiple pdf file

    SSRS report background : Report generating 50 student details with 50 page (each student one page- group by student). now data will export one pdf file with 50 page where each page having one student details.  Requirement : instead of one single pdf

  • JOptionPane: not disappearing properly on seleting "Cancel"

    /*takes SQL statement input SQL Input Window, shows table in Center-Right,Tree in Center-Left, and gives number of records returned in South text field. import java.awt.*; import java.awt.event.*;   import javax.swing.*;                     import ja

  • My Macbook will not load

    My macbook will not load once it opens. The main screen will open, however when I load any program or file it stalls and stays that way, well forever, until the battery dies.

  • Oracle ERP -R12

    Hi , Can some one hep me out in SQL query to find out the default org id set for a 1.Given Responsibilty 2.Given User in Oracle R12

  • RequestDispatcher.forward() bug in WLS61???

    Hi           attached is a web application called forward that demonstrate a possible           bug in weblogic 6.1 server.           Description of the application           index.html:           <html>           <head>           <title>form</title>