How to use File Adapter Receiver to write attachments

Hi,
i have a scenario, in which our own XInotes adapter sends an XIMessage from an IBM Lotus Notes database into XI. This XIMessage contains an XML document as application main document and several PDF files as additional attachments 
On the receiver side, i must use a File Adapter to write both the XML documents and the PDF attachments into a directory.
The problem is i don't know how to use the file adapter receiver to write the attachments. In the Channel Monitoring, i can see that all PDF files are transferred to the file receiver. But the file adapter writes only the XML document into the directory.
I've also tried the AF_Modules/PayloadSwapBean, but it can only swap one PDF file into the application payload. And the file name must be hard coded in the module configuration as swap.KeyName.
Could anyone give me any ideas?
thanks a lot in advance
Xiang

hi,
receiver file adapters do not supprt attachments.
Only File Sender adapter is capable of handling attachments not the receiver.
http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm
Configuring the sender FILE adapter
The sender file adapter is configured to pick the normal payload (file1.xml), which is specified in the File
access parameters, and the additional image file (file1.jpg) that is to be sent as an attachment is configured
under the Additional File(s) as shown in the screenshot below. The file type would still remain binary.
Since, by default, XI sends payload and attachments in XML format, we need to call two beans, namely the
MessageTransformBean and the PayloadSwapBean to help us is transforming the content to jpeg format
and also change the file extension.
The PayloadSwapBean module is used to replace the application payload of the XI message that holds the
data with another payload which is appended to the message as an attachment. In our case, the payload
would be file1.xml whereas the attachment would be file1.jpg
The swap module is denoted in our scenario with the module key ‘swap’. It has two parameters from the
MIME header.
regards,
pradeep.

Similar Messages

  • How to use File Adapter with hierarchial Structure?

    Hi,
    How to use File Adapter with hierarchial Structure like..
    Data:
    --Header Details:
    Line Item Details:
    Data
    Bcoz I am getting a Flatfile in a hierarchial way as shown below.
    Header Details :1
    Line Item a
    Line Item b
    Header Details :2
    Line Item c
    Line Item d
    Kishore

    Hey Kishore,
    In order to create a structure you need to use the file with convertion mode on the sending communication channel of the file adapter.
    check the link for the needed configuration paramters.
    If the structure is more complexed you can use the Contetnt master(CM) from itemfield which allows to ceate XML file from complex flat files and more.
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm">File sender adapter</a>
    If you have any question i'll be more than happy to assist.
    Nimrod Gisis

  • How to use File Adapter in BPEL

    Hi,
    How to use File Adapter in BPEL. I am using Oracle SOA 10g. Any sample or best example in blog or elsewhere ?

    Hi,
    Please check the below links for samples on how to use file adapter in BPEL (in 10g/11g usage is same) and let me know any further queries.
    11g - http://blogs.oracle.com/theshortenspot/entry/soa_suite_integration_part_3_l
    10g - http://erpschools.com/articles/bpel-file-adapter-tutorial

  • How to use File Adapter to transport files

    Hi,
    Can i use File Adapter Additional Files settings to Transfer files from one system to other without conversion?
    File Adapter's Additional Files documentation says "additional attachments require a receiver that can process them". In my case receiver is also
    File Adapter.
    Please let me know if there is any other way to achive this.
    Thanks in Advance
    Jayant

    Hi Jayant -
    Here is the link to the documentation related to this:
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
    Notice in "Rules for Additional Files":
    "Messages with additional attachments require a receiver that can process them."
    Currently, the receiver file adapter does not support the processing of attachments.
    Regards,
    Jin

  • File adapter @ receiver end using fieldFixedLengths

    Hi ,
    I am using file adapter @ receiver end using content conversion.
    Using field separator as 'nl'.
    When i open file in Hex mode it's showing the field separator as 2 Cariage returns(CR) & 1 line feed(LF).
    But the requirement is only 1 CR n 1 LF .                                                                                I tried giving like this,
    Datarow.fieldFixedLengths : 15,15,15,15,10,10,10,10
    Datarow.endSeparator : '0x0A' or '0x0D'
    but da result is same...2 CR n 1 LF..
    even if i dont give endseparator then also same thing is happening..
    regards,
    Kishore

    Hi Kishore,
    Try using fieldseparator directly, instead of working around with fixedFieldlength.
    cheers,
    Prashanth

  • Wrting zip Data using File adapter

    Did any one tried or implemented writing zip/gz file using File adapter.
    I know how to write opaque data using Base64Binary. But i am not getting on how to use file adapter for writing zip file.
    Any help / suggestions are greatly appreciated.
    Thanks !!

    Thanks for the reply, have been using opaque for a while now and know the read & write for that.
    My problem is i am not able to get how i can write compressed data , writing binary data is fine i can use string->encode->base64binary->opaque and can write that.
    But that will not be the compressed form.
    Thanks !!

  • Why cant poll a file more than once using File Adapter..

    Hi All,
    When we run webservice, as I am using File Adapter to read/write the file information.
    Usually, File Adapter reads once every file and it wont read again the same file whcih already red.
    Where and How this status maintained by File Adapter/BPEL in the system.
    Where this will be avvailable and why cant File Adapter read/poll the same file.
    Pls can any one of you share your ideas on the same.
    Thanks.

    Hi,
    Tried to get some information around where ftp adapter stores the timestamp but couldnt find anything useful.
    But we have a table for File adapter which captures the processing information (FILEADAPTER_IN )
    I dont have the setup for FTP adapter to run an example. If you could try the below we can clarify that the timestamp is not stored in memory.
    Configure as usual for a folder with a file pattern for FTP adapter.
    Drop a file to process it and then restart the SOA Suite and try to drop the same file with same timestamp to see wheather FTP adapter picks up or not.
    Ideally i feel once you restart the SOA Suite it should pick up the file, if still not picks up the file for second time then we need to dig indepth to see where this information is stored.
    btw what is your usecase ?
    Thanks,
    Vijay
    Edited by: veejai24 on 11-Apr-2012 03:43

  • Problem in file adapter @ receiver end

    Hi ,
    I am using file adapter @ receiver end using content conversion.
    Using field separator as 'nl'.
    When i open file in Hex mode it's showing the field separator as 2 Cariage returns(CR) & 1 line feed(LF).
    But the requirement is only 1 CR n 1 LF .
    Appriciate ur help..
    Regards,
    Kishore

    Hi
    I tried giving like this,
    Datarow.fieldFixedLengths : 15,15,15,15,10,10,10,10
    Datarow.endSeparator      : '0x0A' or '0x0D'
    but da result is same...2 CR n 1 LF..
    even if i dont give endseparator then also same thing is happening..
    Regards
    Kishore

  • How to get the read input file name in bpel process using File Adapter.

    Hi,
    I am reading a .txt file from configured directory using File Adapter.
    I had configured file adapter to read file with naming pattern “SalesOrder.*\.txt”.
    Now I had requirement to access the actual file name in bpel process eg: “SalesOrder123.txt”
    How can I get the file name in bpel process.
    Any help is appreciated.
    Vidya.

    1) create a variable of message type. Click on Browse Message type. Here you select Message Type-->Project WSDL Files -->fileAdapterInboundHeader-->Message Types-->Inboundheader_msg. Then click OK
    2)Next dbl Click on teh receive Activity which is receing your File from teh File Adapter. Go to the Adapter Tab. Click on Browse variable and select the variable that you had just created above.
    This would get the File name in the variable declared

  • How to read MS-Excel file by using file Adapter

    hi friends,
    I have an issue on read Operation by using file Adapter.
    It is necessary to read excel file by using file adapter. But in the native format of file adapter there is no option to read excel type of files.
    So friends, please help me how to solve this problem?
    Thanks in Advance..

    See also this post:
    Read Excel File Using FileAdapter in SOA 11g
    It might help you

  • How to read pdf file using file adapter

    Hi..
        How to read pdf file using file adapter?
    regards
    Arun

    Hi
    This may help you
    /people/sap.user72/blog/2005/07/27/xi-generate-pdf-file-out-of-file-adapter
    /people/alessandro.guarneri/blog/2007/02/21/sap-xi-acting-as-a-huge-file-mover
    ---Ram

  • 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

  • File Read and Write using File Adapter in Bpel

    In Bpel Process i am using File Adapter ( Schema is Opaque) for read and write the file contents. i am able do successful deployment and read, write function in first time deployment, after that again i tired to run the application, its not going to write the content of file, its only writing the file with out data's or content in that file.
    Please help me...
    Saravanan

    Hi Eric
    In my domain.log file having the following details. In this file im unable to find out what the exact problem. Please look at this and help me.
    <2008-01-22 18:25:42,024> <INFO> <default.collaxa.cube.compiler> validating "C:\product\10.1.3.1\OracleAS_1\bpel\domains\default\tmp\.bpel_BPELProcess2_1.1_298e83988d77b6640c33dfeec11ed31b.tmp\BPELProcess2.bpel" ...
    <2008-01-22 18:25:49,850> <INFO> <default.collaxa.cube.engine.deployment> <CubeProcessFactory::generateProcessClass>
    Process "BPELProcess2" (revision "1.1") successfully compiled.
    <2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Loading JCAActivationAgent for {portType=Read_ptt}
    <2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Locating Adapter Framework instance: OraBPEL
    <2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Done loading JCAActivationAgent for processId='bpel://localhost/default/BPELProcess2~1.1/
    <2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.engine.deployment> Process "BPELProcess2" (revision "1.1") successfully loaded.
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::uninit Shutting down the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.0/', activation properties={portType=Read_ptt}
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - performing endpointDeactivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Endpoint De-activation called in adapter for endpoint : D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::init - Initializing the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.1/
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::initiateInboundJcaEndpoint - Creating and initializing inbound JCA endpoint for:
    process='bpel://localhost/default/BPELProcess2~1.1/'
    domain='default'
    WSDL location='rd.wsdl'
    portType='Read_ptt'
    operation='Read'
    activation properties={portType=Read_ptt}
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - endpointActivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Endpoint Activation called in File Adapter for endpoint: D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
    <2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - successfully completed endpointActivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,890> <WARN> <default.collaxa.cube.activation> <File Adapter::Inbound> PollWork::run exiting, Worker thread will die
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Managed Connection Created
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Connection Created
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> FileInteraction Created

  • Adapter moduler in file adapter receiver - get Target Directory from param

    Hi everybody,
    We are in PI 7.1
    I need in an adapter module (file adapter receiver) to access to the Target Directory comming from parameters
    I foound the code in a weblog
    /people/sap.user72/blog/2005/07/15/copy-a-file-with-same-filename-using-xi
    Here is the code I found
    public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              Object obj = null;
              Message msg = null;
              try {
                   Channel ch = new Channel(moduleContext.getChannelID());
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message) obj;
                   XMLPayload xmlpayload = msg.getDocument();
                   String path = ch.getValueAsString("file.targetDir");
                   if (!path.endsWith("
    ") && !path.endsWith("/"))                    
                             if(path.indexOf("
    ")!=-1)
                                  path+="
                             else
                                  path += "/";
                   if (xmlpayload != null) {
                        convert(xmlpayload.getContent(), path);
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {}
              return null;
         private void convert(byte[] bs, String path) throws Exception {
              String bs_out = new String(bs);
              String filename =
                   bs_out.substring(
                        bs_out.indexOf("<FileName>") + 10,
                        bs_out.lastIndexOf("</FileName>"));
              bs_out =
                   bs_out.substring(
                        bs_out.indexOf("<Base64>") + 8,
                        bs_out.lastIndexOf("</Base64>"));
              byte bb[] = com.sap.aii.utilxi.base64.api.Base64.decode(bs_out);
              File f1 = new File(path + filename);
              FileOutputStream fos = new FileOutputStream(f1);
              fos.write(bb);
              fos.close();
    The object Channel come s from the package import com.sap.aii.af.service.cpa.Channel;
    The jar is in the build path (com.sap.aii.af.service.cpa.jar);
    When I write in NWDS
    Channel ch = new Channel(moduleContext.getChannelID());
    NDWS gives me an error "Cannot instantiate the type Channel".
    Can somebody help me about that, please?
    Does that code dosn't work in pi 7.1?
    Thanks in Advance for your help.
    Best Regards.
    E. Koralewski
    Edited by: Eric Koralewski on Feb 3, 2011 1:40 PM

    > When I write in NWDS
    > Channel ch = new Channel(moduleContext.getChannelID());
    > NDWS gives me an error "Cannot instantiate the type Channel".
    it should be:
    Channel ch = (Channel) LookupManager.getInstance().getCPAObject(CPAObjectType.CHANNEL, moduleContext.getChannelID());
    (taken from sample module ConvertCRLFfromToLF)
    http://help.sap.com/javadocs/pi/pi711sp03/index.html?com/sap/aii/af/service/cpa/Channel.html
    Edited by: Stefan Grube on Feb 3, 2011 2:02 PM

  • File adapter receiver channel is not initialized.

    Hi
    iam wrking idoc-file scenario, as per the requirement i have created 4datatypes  4 mapping in IR with 4 communaction chanles in ID. the scenarios is working fine with 3 mappings.but in 4 the scenario
    the file genaraing properly , i have cheked in SXMB_moni payload but it is not creating in destination system
    in runtimeworkbench->message-monitaring-> adpater
    i have find the below issues
    1) File adapter receiver channel CC_DDPWCS_US_TO_101 is not initialized. Unable to proceed: null  Error 2) Exception caught by adapter framework: File Adapter configuration not initialized:
    3) Error Delivery of the message to the application using connection AFW failed, due to: File Adapter configuration not initialized:.
    please tell me how can i reslove the issue
    thanks
    niru

    Hi
    i have checked the content convertion and changed as below
    the structure is
    Row.fieldNamesTrans_Id,Order,Item,Product_Id,Product_desc,Lot_nr,Ship_via,Exp_qty,Carousel_loc,compart,Destination,Label
    Row.fieldSeparator     ,
    Row.fieldFixedType     char
    Row.endSeparator     'nl'
    Row.addHeaderLine     4
    Row.headerlineTrans_Id,Order,Item,Product_Id,Product_desc,Lot_nr,Ship_via,Exp_qty,Carousel_loc,compart,Destination,Label
    even though iam facing the issue. iam wondering  "_i have used in the similar structure for other 3 mappings in same scenario those are working perfect "_ but based on condition if 4 th mapping is executed iam facing the problem
    error message in RWB/Adapeters
    File adapter receiver channel CC_DDPWCS_US_TO_101 is not initialized. Unable to proceed: null
    Error Exception caught by adapter framework: File Adapter configuration not initialized:
    Error Delivery of the message to the application using connection AFW failed, due to: File Adapter configuration not initialized:.
    please help if any of you face the similar situation , i struck-up long ago here
    regards
    niru

Maybe you are looking for

  • Viewing Nokia location-tagged (geotag) photos on m...

    I have a Nokia E72 which has GPS. I installed the Nokia Location Tagger (beta) application so that taking pictures with the E72's camera will alow geo-tagging the photos (must have GPS-lock status first). So far, I've taken a few dozen pictures on my

  • Is it possible to enter "Input Control" values on the report prompts screen? How?

    Our report users are used to enter their parameters on the prompt. I have created a new report on WEBI XI 3.1. and this report has some prompts and also input controls. That means, when the user wants to run the report they have to enter their parame

  • Reschedule Excel or PDF instance fails with CAST error in CRS 2008

    Rescheduling an Excel or PDF Instance in Crystal Reports Server 2008 gives error message when trying to set parameters.  "An error has occurred:Unable to cast object of type 'CrystalDecisions.Enterprise.Desktop.Pdf' to type 'BusinessObjects.Enterpris

  • Re-installing from the Cloud

    I removed Photoshop and illustrator from Creative Cloud from my MacBook. I now want to put them back in, but they show up as downloaded by the manager and will not download now. How do I get them to reinstall?

  • Downloading itunes to my pc windowx xp

    I cannot seem to complete the download of itunes from apple. am getting a mobileappdevice and it will not let me complete the download