File Adapter to read Zip file and send it as input to another webservice

Hi,
I have the below requirement:
1. A service will generate 3 attachments and place it in a particular directory.
2. SOA service has to pick those 3 files and send those files as input to another custom application which will email.
Design :
1. First SOA will create an archive file of those 3 attachements and then file adapter will poll for that zip file in that location and send that file as a whole to the custom application.
Query:
Now my question, is the above design feasible? If so, how to configure the file adapter to pass the file as input to that custom application?
Kindly do the needful
Thanks,
Priya

You can accomplish this via java embedding activity...Create a java embedding, which will create a zip file.. this java code is easy to implement..
You can also do away with un-necessary polling file adapter.. and you can use "Synchronous File Read" operation of File Adapter.. For Sync Read, you'll have to pass the zip file name, which you can easily fetch from java embedding activity..
Let me know, if this doesn't work.

Similar Messages

  • File Adapter Not Reading Large Files

    Dear Experts,
    Enviornment :-
    OS:-Linux
    Jdeveloper:- 11.1.1.6
    SOA:-11.1.1.6
    Weblogic:-10.3.6
    JDK:-SUN
    Allocated RAM:-16GB
    Currently we are in UAT Phase and now we are facingan  issue in reading large file.Below is the Design details of the service
    FileAdapter(Read)-->Bpel(Business login,Using FlowN)-->FileAdapter(Write CSV),JMS Adapter(AQ JMS topics)
    In this case at the time of read itself we are facing issue. File adapter reading xml file but in receive activity receives input data as
    xmlDocKey:1C135990067411E3BFA6B5087B629F9DI
    I really couldn;t understand about the error. Even i tried reading as Opaque format and still end up with same error.
    In order to make sure i have create mediator and tried reading the file, in case i was able to read file upto 15mb with out any error.Also i tried as  "read as Attachment" in Bpel component and able to read the attachment upto 7 mb file, but this is hitting the performance side.
    I request some one please let me know why the file adapter is giving XmlDOCKey rather then XMLContent to the inputvariable
    Regards,
    Tarak

    Can you check your BPEL Properties in EM?
    Go to Soa-infra > right Click > SOA Administration > BPEL properties
    increase the Dispatcher Engine Thread = 10, Dispatcher Invoke Threads = 60 and Dispatcher Engine Threads to 90
    Click on "More BPEL Configuration Properties"
    Increase the  DispatcherMaxRequestDepth from 600 to 1000.
    Bounce the server and see if works..
    Bounce the server and try again.
    If this fails, try get a threshold by increasing the file size until it fails again. 

  • File Adapter-Problem Reading Huge Files

    Hi,
    Here is the issue that i am facing
    When reading huge file(csv file upto 6MB-8MB) the communication channel configured as File Adapter with a polling interval of 7 min(420 sec) is inconsistent in reading the complete file.Sometimes it reads the the complete file of 6 MB and sometimes it reads a part of the file say 3MB/6MB.Can this inconsistent behaviour be resolved.??
    Your suggestions highly appreciated.
    Regards
    Pradeep

    Hi Pradeep !
    8mb is not a huge file for XI, I think it is a small one. Maybe your problem is not the size..please check if XI is not starting to read the file before it is completely written to the source folder. If you are creating that csv file from another application directly to the poll source directory of the XI scenario specified in the file adapter, and your poll interval is small, XI could start reading the file while you are still writing it. If this is the case, try to put the file with a different extension or filename than the specified in file adapter comm channel and when the file is completely written, rename it to its final filename and check if you are still having that misbehavior.
    You can write the file to a temp directory and the move it to the XI directory once finished.
    Regards,
    Matias.

  • Invoke File Adapter to read just once.

    Hello all,
    I want to invoke a partnerlink which is using File Adapter to poll for a file every fixed interval. I want the File adapter to read the file just once. In other words, what would be the behaviour of the File Adapter when i invoke it syn or asyn way? Would the file adapter read the file only once? Is there anyway to do this? I read in some post about it but i cannot find or recall the thread.
    Thanks for your help.

    I think I need to explain the scenario in order to give you some more idea as to why i need to poll file just once.
    I am trying to create a schedular using Quartz and If i have this BPEL process scheduled to trigger at say some time, the process would keep on polling. Whereas i just need to poll when the trigger is fired that is once per every trigger fired.
    Can anybody throw some ideas on this?

  • FILE ADAPTER NOT READING FILE.

    HI, GUYS.
    I'M USING A FILE ADAPTER TO READ A FILE THAT HAVE 4 REGISTERS AND EACH REGISTER ONLY HAS ONE FIELD THAT IS NUMBER TYPE.
    I CREATE THE FILE ADAPTER, AND I LET BPEL TO CREATE THE SCHEMA. THE IDE CALLS THES FIELD "C1". I ALSO CONFIGURE THAT THE FILE THAT MUST RAD IS THE PATTERN "*.TXT" AND EVERY 5 SECONDS.
    THEN A CREATE A RECEIVE ACTIVITY THAT RECEIVES WHAT WAS READ FROM THE FILE ADAPTER IN A VARIABLE.
    THEN I CREATE AN ASSIGN ACTIVITY AND I ASSIGN THE VALUE FROM THE RECEIVE ACTIVITY VARIABLE TO A NUMBER VARIABLE THAT IS THE INPUT OF A WEB SERVICE.
    THEN I DEPLOY THE BPEL, AND I INITIATE IT, BUT I GOT AN ERROR THAT SAYS THAT THE FIELD "C1" IS EMPTY. SO LOOKS LIKE THE FILE ADAPTER IS NOT READING THE FILE. I WOULD THANK ANY HELP THAT YOU CAN BRING ME.

    caps off
    You're sure the interface of the fileadapter (client partnerlink) is the same as your data-file which needs to be picked up?
    can you paste the content of the file and the content of the xsd of the process.

  • Reading .ZIP files using File Adapter

    Hi,
    I am using BPEL File Adapter to read files. The files to be read are XML files which are in zipped format.
    so how should I read these .zip files and extract the XML files from that.
    Thanks
    /Kiran.

    If the xml files are all in the same directory (not in any directory structure relative to the parent directory), you can do something like this.
    - create a bpel process to read the zip files as it comes into the directory]
    - Have a file adapter inbound for the receive
    - Call windows .bat command within the bpel process to run an unzip command on that directory
    - Have another bpel process that reads *.xml files and this will get kicked off.
    There are so many ways of solving this: like having a cron job to unzip the files coming in etc. But, if you have a directory structure for these XML files and if the structure is dynamic, it is difficult to configure the file adapter for that.

  • XI Sender file adapter - How to process data and control files.

    Hello all,
       I have the following requirement to fulfill: I am using an FTP client (XI Sender file adapter) to retrieve data from an FTP site. To make sure I am not picking up a data file that is currently being written to, 2 files are actually present on the FTP site (for each data file):
    1. abc.ctrl (control file with no data in it. Indicates that the data file has been completely written).
    2. abc.dat (actual data file).
      I want the file/ftp connector in XI to retrieve the data file (abc.dat) only if the control file (abc.ctrl) is present. After the processing of the data file is finished, both files (.dat and .ctrl) should be deleted.
      Is there an elegant and robust way to accomplish this?
    Thanks for your help.

    Hi Yves,
    in my opinion there's no problem with files currently being written in combination with a polling file adapter because the final file name should be available only when the file is transferred completely. I'm using different file sender adapters very often and never had any problems. After picking up the files I move them to the corresponding archive folders mentioned in the adapters so that a second processing cannot occur.
    Regards
    Ralph

  • Sener file adapter has read/pick the files first in first out method.

    HI
    In my Interface I am Using Sender as File adapter. As per my requirement Sender file adapter has to read the file from file directory. This directory having 1000u2019s of files with some files are same name (time stamp is different) and some files are different name here file adapter has to pick the file with mentioned name   in File sender adapter like ZMPSMSGSTATUSMST-.xml .
    But source file name is like <TABLENAME>-<TIME_STAMP>.XML (ZMPSWRKFLOWHIST-20090527-150522-628) in file directory.
    The file adapter in XI will poll to this directory and picks the file in first- in first-out by sorting according to timestamp.
    To do this configuration what I have to do in sender file adapter please give me your valuable inputs.

    HI Abhi,
    Thank you for your spot replay.
    I tested now but i am geting below error.
    Putting message into send queue failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException: Message ID f4ca4f86-9c5d-4bdd-1fb1-a6bd7cda99a8(OUTBOUND) already exists in database: com.sap.sql.DuplicateKeyException: [NWMss][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK__XI_AF_MSG__491A1D0B'. Cannot insert duplicate key in object 'dbo.XI_AF_MSG'..
    Could not archive file 'E:\file\in\ZMPSMSGSTATUSMST-20090527-150522-628.xml' after processing
    but i am able to see this file in Archive foleder. once file is archivied sucessfully the same file is delted from source directory?
    I given processing parametes queue name is TEST.
    Thanks
    srinivas
    Edited by: srinivasreddy p on May 28, 2009 8:43 AM
    Edited by: srinivasreddy p on May 28, 2009 8:52 AM

  • Sender File adapter not picking the file ABCD.PRN extension file

    Hi
    Am doing File to Abap Proxy scenario. My source will be in text format of fixed length of fileds 7.
    My souce file will be generated by a third party machine with the extension EEE150809.PRN. In my scenario my file adapter should pick the file and update the same in ECC via a Proxy.
    I have configured the Sender File adapter with Message Protocol -  Content Conversion but file adapter is not picking the file. I have checked the Communication channel and status is fine. But the same Communication Channel works for .XML file.
    What are the parameters that I have to consider with the file extension .PRN using File adapter?
    Thanks.
    S.

    Hi Swarna,
    You dont need to worry about the extension when picking the file. You can try using EEE* so that is picks all the files starting with EEE. If you have the fixed name then you can try giving EEE150809.*. Also EEE150809.PRN should not have any issue. Try to see in sender commu ication cahnnel for anyerrors. Probably there might be some network issues or authorisation issues. If you are reading with NFS then ask them to give necessary permissions. If you are reading through FTP check the user id and pwd you are using.
    Regards,
    ---Satish

  • Sender File Adapter stop processing all files

    Hello all,
    the file adapter pick up all files in the directory by default.
    if  a large number of files are in the directory then this could slow down the pi processing.
    is there any way to process only one file per polling??
    regards

    >
    Ralf Zimmerningkat wrote:
    > Hello all,
    > the file adapter pick up all files in the directory by default.
    > if  a large number of files are in the directory then this could slow down the pi processing.
    > is there any way to process only one file per polling??
    >
    > regards
    I do not have any proble if you have got the answer. BUT this blog says how to exclude the other files from the same folder.
    Your Case: For example, Your Sender CC wants to pick up file ABC.txt from /xyz dir, now suppose there are 10 thousand files of same name in the dir and you want ABC.txt should be picked up one by one, So how this blog is going to help you. Can you Plz explain to me and others too?
    @Sachin may be you can throw some light on this... may be I am missing something.

  • File Adapter to read from remote file server query

    Hi all,
    I want a SOA 11g application to read files on remote server using File Adapter. Is it possible to configure the File Adapter to read from remote location instead of locally. Is it possible. Is yes where can I find the associated remote file configuration documentation.
    Thanks
    Edited by: user5108636 on 19/09/2010 19:49

    I also changed one more properties the FTP connection factory called serverType=win. I get bits and pieces in each document. Is there any working example to connect to an FTP server running on Windows using Ftp Adapter. Still not working.
    These are the error logs related to it. Please suggest
    ####<Oct 12, 2010 1:17:22 PM EST> <Info> <Common> <server_name> <WLS_SOA> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <46e7c258a0e5cad6:-145e5cdb:12b99475c2b:-7ffd-0000000000046afa> <1286849842995> <BEA-000628> <Created "1" resources for pool "eis/Ftp/FtpAdapter", out of which "0" are available and "1" are unavailable.>\
    [2010-10-12T12:56:07.142+11:00] [WLS_SOA] [NOTIFICATION] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@170e13a9] [userId: weblogic] [ecid: 0000IiTsVSi9xWD_n91FiZ1CfLfc00006s,1:24709] [APP: soa-infra] [dcid: 46e7c258a0e5cad6:f9faea1:12b852b7f0f:-8000-00000000000005ed] FTP Adapter FetchAvlFiles Recovery still not possible after 1500 attempts due to javax.resource.spi.IllegalStateException: [Connector:199176]Unable to execute allocateConnection(...) on ConnectionManager. A stale Connection Factory or Connection Handle may be used. The connection pool associated with it has already been destroyed. Try to re-lookup Connection Factory eis/Ftp/FtpAdapter from JNDI and get a new Connection Handle.
    Thanks
    Edited by: user5108636 on 11/10/2010 19:05
    Edited by: user5108636 on 11/10/2010 19:22

  • How to get file name using File adapter Sync read

    Hi All,
    I am using SOA 10.1.3.3 and JDEV 10.1.3.3.
    I have an async bpel process.
    I have to read file name in this process... so i have used file adapter sync read operation.
    How can we get the file name with out payload using sync read.
    For normal read (Inbound Spec)we have UseHeaders="true" property.
    Is there any property for sync read to read the file name.
    Please help me
    Regards
    PavanKumar.M
    Edited by: [email protected] on Oct 27, 2009 11:23 PM

    Hi Eric,
    The info in the link provided by you is for a normal read.
    I need to read he file name using Sync read operation.
    Regards
    PavanKumar.M

  • Program to read zip files???

    im looking for a program to read zip files?Is this even possible on a mac? Im running 10.4.11 on my ibook g4

    Hello,
    What you need is a program that can OPEN .zip files. Go here: http://my.smithmicro.com/mac/stuffitexpander/index.html
    Download the free installation and just follow the instructions to open .zip files.
    Carolyn

  • Error reading zip file in Java 6

    We have a bespoke installer program that fails, intermittently, in Java 6 on Windows. After installing some files, it then fails with a stack trace like this:
    java.util.zip.ZipException: error reading zip file
         at java.util.zip.ZipFile.read(Native Method)
         at java.util.zip.ZipFile.access$1200(ZipFile.java:29)
         at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:447)
         at java.util.zip.ZipFile$1.fill(ZipFile.java:230)
         at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at com.XXXX.trent.installer.Installer.writeStreamToFile(Unknown Source)
         at com.XXXX.trent.installer.Installer.installFile(Unknown Source)
         at com.XXXX.trent.installer.PatchFileInstaller.installFile(Unknown Source)
         at com.XXXX.trent.installer.PatchFileInstaller.installFiles(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller$TpfAction.run(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller.runActions(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller.install(Unknown Source)
         at com.XXXX.trent.installer.TrentInstall$SoftwareInstallStage.install(Unknown Source)
         at com.XXXX.trent.installer.TrentInstall$UpgradeInstallWorker.install(Unknown Source)
         at com.XXXX.trent.installer.PatchInstall$InstallWorker.construct(Unknown Source)
         at com.XXXX.trent.utils.SwingWorker$2.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)The same code works in Java 5 on the same environments that it now fails in Java 6 (1.6.0_16).
    Any ideas?
    Thanks.

    gimbal2 wrote:
    it is not weird, it is a bug in the application. Don't let the upgrade from Java 5 to Java 6 make you believe otherwise.It's a singularly bad exception message though. I would have thought that something from java.util might be a bit more explicit about what the problem is.
    Winston

  • Alternative APIs for reading Zip files?

    Hi all.
    At the moment, our application handles zip files by copying the zip file to the temp directory and then creating a new ZipFile. However, the larger the zip file we encounter, the slower this copy becomes. We also need random access to the Zip file, so the usual workaround of using ZipInputStream is also slow, although slightly faster for random access than copying the entire file.
    I raised a bug requesting a better constructor for ZipFile, but it was turned down as they seemed to think I didn't want random access.
    But does anyone know of any alternative APIs which can access Zip files in a more random access fashion? I've discovered a few other alternative implementations of ZipFile, but all of them so far have had this issue of requiring a File.

    intensive. I am basically searching through zip
    files to find a file and then taking that inputstream
    for processing. I am basically looping through the
    zip file until i match the filename....pretty crazy.I think it is pretty I/O intensive...hence slower
    to see what I can do to increase performance. I am
    using the following parameters:
    -Xms512m -Xmx1024M -Xss16M -XX:ThreadStackSize=256
    -XX:MaxPermSize=256m
    Parameters look ok. I am not sure what -XX:ThreadStackSize will do as -Xss also sets the stack size? you can also try to pass -server and keep both Xms and Xmx to 1024 and see if it brings any improvement.
    -BJ

Maybe you are looking for

  • Welcome to the Linksys Small Business Community!

    Welcome to the Linksys Small Business Community! Please feel free to share your experiences with our SMB products here. Thanks!

  • How to find end of the Page in Crystal ? or I need to add one Horizontal line at the end of the page.--- URGENT HELP NEEDED

    Hi friends, I need to add one horizontal line  for the detail section at the end of the page. I tried to put that line in page footer and i tried with Box also. Both are not properly working. Some space problem is coming. Is there any feature to find

  • Condition 'or'  on  a read table

    you can put a condition or the key of a table read example.     READ TABLE i_bsid ASSIGNING <f_bsid>                        WITH  KEY kunnr = <f_zppo>-kunrg                                 belnr = <f_zppo>-belnr                                 bldat

  • Automate to Sequence - Set To Unnumbered Markers

    I'm using Premier Pro CS3 on a Windows XP machine. I've found that if I select the "Sequentially" Placement Option under "Automate to Sequence" the other option (Set to Unnumbered Markers)in the drop-down box completely disappears (not just grayed ou

  • Changes required for Migration from CR 8.5 to CR 11

    Dear All,   We have successfully migrated all the reports which were created in CR 8.5 to CR 11. But those same reports developed in CR 8.5 are called through .exe which has been built with Microsoft Visual Studio .NET 2003. The old reports of CR 8.5