New file adapter

Hi,
I need to create a new file adapter.
I've read some documentations that say PCK could be used. Is that mandatory?
I've also found some code sample.
But I still don't know what to modify in a the sample nor how to deploy my new adapter in order to select it in XI's directory part.
Regards
Yann

Hi Yann,
I am not sure whether I have understood you correctly..Do u want to create a new file adapter itself, or write an adapter module for a file adapter?
Please take a look at these..
http://help.sap.com/saphelp_nw04/helpdata/en/e9/61e1407e858031e10000000a1550b0/frameset.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da5675d1-0301-0010-9584-f6cb18c04805
cheers,
Prashanth
P.S Please mark helpful answers

Similar Messages

  • ESB - How to add filter to avoid file adapter to start executing?

    I have an esb project with first a file adapter that reads incoming XML files. Mapped with a database adapter that calls a stored procedure that inserts data in certain tables. The output parameter of this stored procedure is of type pl/sql table and contains data of an error if an error has occurred while processing the procedure. A new file adapter will create a new file with the content of the output parameter. But if the outputparameter is empty it will give an error.
    Is there a possibility to add a filter to avoid that the file adapter starts trying to create the error file?
    Thanks,
    Els
    Message was edited by:
    user644760

    Hi Els,
    A possibility is to add a routing service in between the database invocation and file adapter with a single routing rule. Add a filter to the routing service to test whether the input is empty.
    Regards, Ronald

  • File Adapter BPEL Trigger

    Hi,
    This should be a really easy thing to do but I'm obviously missing something simple and fundamental.
    I want to set up a BPEL process that is initiated by the receipt of a file. All I initially want to get from that trigger is the name of the file and pass that value on to the next step in the chain.
    So, I created a new BPEL Process project and added a File Adapter service, filling in all the details for picking up the file from the place that it'll arrive. Reading the "Adapter" manual, I should be able to get the file details (name, directory) by adding UseHeaders="true" into the JCA definition in the File Adapter's WSDL file. I have done this. Doing this creates another WSDL file called fileAdapterInboundHeader.wsdl Now, this is where I get lost. How do I use this?
    By default, a new BPEL Process diagram shows a "Client" Partner Link, a receiveInput activity and a replyOutput activity. The receiveInput activity links from the Client Partner Link and the replyOutput activity links back to the Client.
    So I'm guessing that I need to replace the Client partner link with my new File Adapter service so that the detection of the file starts my BPEL process, rather than some triggered activity from a client.
    This is basically what I've done but it's really not working. How do I get at the filename that's gathered by the File Adapter service? Do I need an XML schema definition to work from?
    Perhaps there's a nice simple example of this somewhere that somebody could point me at? I've been searching but not found anything yet.
    Thanks,
    Andy

    I've written up this procedure in a bit more detail than RedRocker originally provided so that people like me who are complete noobs to BPEL and JDeveloper can do this more easily. The example I give here takes the filename and writes it to a database table. The table just has a FILE_ID column (automatically populated from a sequence by an ON-INSERT trigger) and a CONTENTS column (where the file name goes):
    How-To Get the name of an Input File and store it in a database table column.
    1) Assuming that you're using JDeveloper and you have an Application Workspace, right-click on the Application and choose New Project from the context menu.
    2) In the New Gallery, select Projects and then choose BPEL Process Project from the Items list:
    3) Create an Empty BPEL Process by choosing Empty BPEL Process from the Template dropdown of the BPEL Project Creation Wizard.
    4) This will bring up a completely empty BPEL Process in JDeveloer:
    5) From the Component Palette (top-right), choose Services and then locate the File Adapter Service in the list.
    6) Drag the File Adapter service from the Component panel to one of the Services columns in the main BPEL process designer (centre window). A Wizard will appear.
    7) Enter a name for the Service (eg. GetFileName). Fill in the description if you wish.
    8) Choose Read from the Operation Type list (adjust the Operation Name if you like):
    9) Enter the physical directory (or logical name for one) where the file is to be read from. Decide on whether you want the file to be deleted after it's been read (it won't be re-processed if it's left there since each poll cycle only looks for files that arrived more recently than its previous cycle), and whether to archive the file.
    10) Enter appropriate file selection filter criteria (note that for this BPEL example we're not interested in the file's content at all so the "Files contain Multiple Messages" tickbox and "Publish Messages in Batches of" selector are unimportant):
    11) Select an appropriate Polling Frequency:
    12) Select an Opaque schema (we're not interested in the file's content in this example)
    13) Click Finish
    14) Click OK to close the Partner Link creation wizard
    15) Click Save All.
    16) From the Application Navigator, drill down through the newly created BPEL Project, through the Integration Content folder to find your GetFileName Partner link. Expand this and double-click the GetFileName.wsdl file. In the centre panel, click the Source tab (at the bottom):
    17) Scroll down to the <jca:operation> tag and add the attribute UseHeaders="true" at the end
    18) Click Save All.
    19) Return to the main GetFileName BPEL Process designer by clicking the tab name at the top of the centre window. In the Structure panel (bottom-left), expand the Variables folder, followed by the Process folder and click the exposed Variables folder
    20) Create a variable by clicking the "Wand +" icon.
    21) Give the variable a meaningful name (FileName) and choose Message Type. Click the Browse flashlight:
    22) Choose InboundHeader_msg by drilling down as shown:
    23) Click OK and OK.
    24) In the Component palette (top-right), choose Process Activities from the dropdown list. Locate the Receive activity and drag it to the centre of the middle panel (ie. the BPEL Designer window) into the area marked "Drop Activity Here":
    25) Double-click the new Receive activity to bring up the properties dialogue box. On the General tab, give the activity a meaningful name (eg. ReceiveFilename).
    Click the Browse flashlight next to the Partner Link field and choose GetFileName from the list. The Operation dropdown will automatically show "Read" which is correct.
    26) Click the Auto-Create Variable ("Wand +") icon next to the Variable field. This variable is merely a placeholder for the content of the file being read. Because we've said that the incoming file's schema is Opaque, this variable will not get populated. However, we still need to have a variable. Give the variable a meaningful name (eg. FileContent) and allow the type to be selected automatically and then click OK on the Create Variable dialogue.
    27) Given that we'd want the receipt of a file to be individually traceable, ensure that the Create Instance checkbox is ticked on the General tab:
    28) Click the Adapters tab. Click the Browse flashlight next to the Header Variable field and select the FileName variable from the list presented and click OK:
    29) Click OK on the Receive activity property page to return to the main BPEL Designer screen.
    30) At this point, the data is available within the BPEL process but needs to be assigned to something. In this example, the value is going to be written to the FILE_NAME column in a table called ACH_INUPT_FILE. This will be done through an Insert performed by a Database Adapter. The ACH_INUPT_FILE table is configured to have an ON-INTERT trigger which automatically selects a value from a Sequence for its Primary Key value. Therefore simply inserting a row will provide a Unique value in the FILE_ID column.
    The next thing we need to do is create the Partner Link that performs the Insert operation. This will create a variable which we can assign the File Name to when this new Service is linked into the process flow.
    From the Component panel, choose Services from the dropdown. Locate the Database Adapter service and drag one onto the BPEL Designer page in the Services column.
    The Adapter Configuration wizard appears. Enter a meaningful name from the adapter (eg. WriteFileName). Enter a description if you like and click Next.
    31) Choose the appropriate Connection from the dropdown list. Click Next.
    32) Choose "Perform an Operation on a Table" for the Operation Type and deselect all operations except Insert Only. Click Next.
    33) Click the Import Tables button. From the presented table, ensure that the table that's going to hold the data is selected by shuttling the table from the Available panel to the Selected panel. In this case I've selected the ACH_INPUT_FILE table. Click OK.
    34) The Select Table panel shows the ACH_INPUT_FILE table. Click Next.
    35) In this example there are no further relationships to make, so click Next on the Relationships page:
    36) Click Finish. The Database Adapter's Partner Link properties page is displayed. Note that the Partner Link Type and Partner Role are automatically populated from the information gathered in the previous set of dialogue pages. Note that to change any of those values previously entered, click the Define Adapter Service icon. Click OK.
    37) In the Components Palette, select Process Activities from the dropdown. Locate the Invoke activity and drag one to the main BPEL process flow and drop it immediately below the ReceiveFilename activity.
    38) Double-click the new Invoke activity and the Invoke property panel is shown. On the General tab, give the Invoke activity a meaningful name (eg. InvokeWriteFileName).
    Click the Browse flashlight next to the Partner Link field and select WriteFileName from the list of presented services. Click OK.
    39) Note that the operation "insert" is automatically populated into the Operation dropdown.
    40) Click the Automatically Create Input Variable icon (Wand +) next to the Input Variable field. Accept the default "InvokeWriteFileName_insert_InputVariable". This creates the variable of the right type that's needed by the WriteFileName service.
    41) Click OK to close the WriteFileName Invoke activity property sheet. Note that there is a warning flag next to the new Invoke activity. We need to assign the file name to the Invoke activity's Input Variable.
    42) From the Component Palette, drag an Assign activity so that it sits between the Receive and the Invoke activities in the BPEL flow.
    43) Double-click the new Assign activity and click the General tab. Enter a meaningful name for the activity (eg. AssignFileNameToDBWriteInput).
    44) Click the Copy Operation tab. Click the Create button and select Copy Operation from the list of types.
    45) In the From panel, choose Expression from the Dropdown list. From the panel, click the XPath Expression Builder icon (highlighted).
    46) From the Function list dropdown under the Functions heading, select Conversion Functions. Double-click the "string()" function. This moves the string() function into the Expression panel at the top as shown.
    47) In the Expression panel, click inside the ( and ) brackets. Expand the variable FileName in the BPEL Variables panel below and select the fileName element from the InboundFileHeaderType element. Double-click the fileName to move the XPath expression into the Expression panel:
    48) Click OK. In the To panel, ensure that the Type dropdown shows Variable. Drill into the InvokeWriteFileName_insert_InputVariable and select the element that the file name is to be assigned to. In the example illustrated, the variable is called "contents" but that's just because the table has that as the field name rather than "filename".
    49) Click OK. The Assign property sheet shows the Copy Operation as below:
    50) Click OK. The Invoke operation may still show a warning flag. Click the flag to see the errors/warnings. If there are now errors/warnings shown, click OK to dismiss the panel and the flag will disappear. The BPEL Process is complete and can be deployed.
    It is long-winded, but it might just help somebody else.
    Andy

  • New line character in File adapter

    I am having a receiver file adapter which generates files with multiple lines.
    My problem is when the target file is opened in notepad there is no line break and the lines comes as continous string with small rectangle as separator.This fails the target upload program.
    When I remove those small squares in notepad and hit enter and then upload it gets uploaded successfully.
    Is there any way to have line break so that new line will be generated each time (the documenation says the by-default it adds new line character then why in notepad it opens like a continous string?)
    Thanks in advance.
    Regards
    Rajeev

    Hello
    I know by default File Adapter value is line break. But if I open that generated file in notepad, the record does'nt appear on the new line. Instead at the end of each line there is special character added at the end of each record. When I hit enter and deletes that special character and then try to load that file it gets loaded successfully.
    So my problem is how to generate the file will give record on the new line. I tried to give 'nl' as endSeparator.
    How to give hexadecimal values? I tried giving '0xHH' but that gives error in File Adapter
    "Error: Conversion initialization failed: Exception: java.lang.NumberFormatException: For input string: "HH"
    Thanks in advance.
    Regards
    Rajeev

  • File Adapter - FTP - Unable to Create new pooled resource

    Hi Friends,
    I am getting the following error while using file adapter with FTP protocol...
    Attempt to process file failed with Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: FTPEx: PASS command failed
    Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: FTPEx: PASS command failed
    Error Exception caught by adapter framework: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: FTPEx: PASS command failed
    Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: FTPEx: PASS command failed.
    Can someone help me to solve this probelm..
    Regards,
    Shyam.

    Hi,
    Try to check the directory you have specified in the CC and also check whether you are able to connect to the FTP server with those login credential and access the directory specified.
    Also let me know whether it is working fine for other scenario's or not.
    Regards,
    Nithiyanandam

  • File Adapter Write Operation inserts a new line at the end

    Hi,
    I am using the write operation in the File Adapter from BPEL Process. The data is written successfully to the file and file is also created in the location specified in the adapter wsdl. But in the file created, it creates a new line at the end of the file. This new line has to be avoided when writing data to a file.
    Has anyone faced this and solved this ?
    I am SOA 10.1.3.4.
    Cheers,
    - AR

    It is a bug in 10g and will be resolved in one of the versions of 11g.
    Cheers,
    -AR

  • How to make BPEL File Adapter read only new files?

    Hello
    we have BPEL processes that define to run from bpel component - file adatper-
    when a file come into location that it is path on the linux server . the bpel start run when "File Adapter" bpel component recognize that new file come to the location. its PollingFrequency define to 5. property name="DeleteFile" value="false" so the files remaine there.
    we want to migrate the bpel to new SOA version so we did export and deploy to new SOA Domain.
    the location of the file adapter is the same.
    but when the BPEL processes deployed its start to run for all the files that are in this location- that the file adapter define on .
    even the original soa tooks those files and start the BPEL processes for each one of them. also the new SOA that we did deploy to the BPEL processes take those files even if they are very old.
    we want the file adatper we take only new files . the start point is the time when we do deploy to the process so if we do deploy in 10:00 am we dont want this bpel will take files from 9:00 or earlier time
    Please help , how we can do this?
    Thanks

    thank you
    do you kno hat the value means in the example:
    Java mon amour: File Adapter metadata with SOA Suite
    <property name="jca.file.LastModifiedTime" value="1293041258635">
    what should I rite for read only the files that are only neer then yesterday?

  • New Line in EBCDIC file created by receiver file adapter

    Hi mates,
    I've configured the receiver file adapter to create a file in EBCDIC format by specifyin the File encoding 'Cp037'. When the file is viewed on the AS400 system using the command DSPPFM, it appears as a continuous text instead of line-by-line. I've tried specifying 0x0D(CR), 0x0A(LF), 'nl' as the endSeparator for the record type in content conversion, but no luck. Still the file looks like a continuous text.
    I learnt from the following links that the New Line character (NL or NEL) in AS400 is Unicode '0x85'.
    <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4867251">OutputStreamWriter/InputSreamReader convert NEL to linefeed with Cp037 encoding</a>
    <a href="http://search.cpan.org/~guido/libintl-perl-1.16/lib/Locale/RecodeData/IBM037.pm#CHARACTER_TABLE">CHARACTER TABLE</a>
    But when I specify this '0x85' as the endSeparator, I get the error below as 0x85 (decimal equivalent 133) is not part of the standard ascii code i.e. basic 127 codes
    <i>Conversion initialization failed: java.lang.Exception: java.lang.NumberFormatException: Value out of range. Value:"85" Radix:16</i>
    Is there any way I can produce the EBCDIC file with new line as end separator for records?
    I appreciate your inputs.
    thx in adv
    praveen

    Instead of using binary mode for FTP and specifying encoding, endSeparator, I used the text mode and left the translation to the FTP server on AS400 system.
    Desirably, it generated the file with right encoding and new line characters.
    praveen

  • File Adapter inserting New Line

    All -
    I'm stuck on this one.  Would anyone know why the File adapter would insert a New Line at the beginning of my file?  The file is output correctly with the exception of a blank line at the very beginning of the file.
    Are there any conversion parameters I need to supply for the receiver file adapter?  I currently have:
    data.endSeparator = 'nl'
    data.fieldFixedLenths = 30,30,15,3
    data.fieldNames = F1,F2,F3,F4
    data.fixedLengthTooShortHandling = Cut
    Thanks,
    Dave

    Ok, found the issue!
    The File Adapter is configured as FTP and when the file is FTP'd to the target directory and viewed using Internet Explorer, a carriage return/line feed is added to the beginnig of the file.  When I FTP the file from the remote directory to my local directory and then view the file, it's fine.  Not sure why Internet Explorer changes the formatting of the file.
    Bottom line - the remote file is fine.
    Cheers,
    Dave

  • File adapter. Only get new files

    Hi there,
    I have a small problem that I'm not able to solve that easily with XI.
    I have some directories that I need to get files from on a remote server. The only problem is i need to get only the new files and I am not allowed to delete the old files. Since we are not the only one getting those files.
    So far I have not found any option to keep the old files and only get the new ones. Does anybody know a neat trick to get only the new ones?
    Regards,
    Wietse

    > Hi again Wietse,
    > After configuring the file adapter the way i
    > mentioned,check for performance, you might need to
    > install remote Adapter engine if you have some FW
    > problems or other security barriers that turn the
    > processing of this file to a hassel over the net.
    >
    > Nimrod
    Problem still is I am not allowed to do anything else then ftp/get on the files. I can't install a remote adapter engine or change anything to the files.
    I hoped that it would be possible to store the filenames somewhere and compare a dir listing to the stored filenames before the real get is done. But even when writing an adapter module, the file will already be in the adapter once the module kicks in. And I don't want to get old files that I've already processed into my system since there is a huge history of files on the machine.
    I think I might end up writing a perl script that searches for the new files and gets them and them sends them through to XI using a SOAP call.

  • Cretaing a new adapter using the existing file adapter

    Hi,
    Is it possible to create a new adapter type copying the existing file adapter. That is I want to create a new adapter type for example "FNFS" and use the same module callsapadapter which is used in the File adapter. So that this new adapter type "FNFS" functions like the File adapter,
    What are the actions I need to perform to acheive this.
    Thanks in advance.

    what will be the significance of that?
    I think if you need some extra functionality then Development of Custom Module is enough.
    /people/john.ta2/blog/2006/12/20/to-create-or-not-to-create-an-sap-xi-adapter
    Thanks
    farooq.

  • New Bee, Help File Adapter

    Hi ,
       I am new to XI , I have a basic question on file adapter.
        I have configured a file adapter to pick a file with name abc.txt and delete it. Assumes my total scenario takes 30 min to complete. If i get another file in the source folder after 5 min. Does XI process the second file also parallel. Or does it finish first file and then process the second file?
    Regards
    Monika Dietz

    Hi,
    >>>>Or does it finish first file and then process the second file?
    the file adapter will pick the file as soon as possible
    from the folder but you can set quality of service
    EOIO so it will wait until the first one will finish
    (and other parameters in the integration eigine
    so your flow will be processed by one queue only)
    but basically it will be processed in paralel
    (with standard config)
    reference:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    Regards,
    michal

  • File Adapter Acknowledgement in BPM - NEW Question

    This is in cntinuation of my earlier question:
    File Adapter Acknowledgement in BPM
    Now I understand that the send step should wait to get the acknowledgement from file adapter.
    As I understand This ack may be +ve or -ve.
    <b>So my question is how do we test for + ve acknowledgement in the next step / switch?</b>
    Thanks,
    HImadri

    hi,
    in condition editor of this switch step you need to choose technical objects
    and check it they = true
    for sender apps
    you can also use Main/MessageClass field 
    have a look at the bottom of this page to
    check their values:
    http://help.sap.com/saphelp_nw04/helpdata/en/6e/ff0bf75772457b863ef5d99bc92404/content.htm
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • XML validation in sender file adapter

    Hi
    I am using FCC on the sender file adapter ....i need to make sure that one of the fields should always be integer else the sender adapter should give error
    Can i use xml validation with FCC on the sender file adapter?

    Hi Hema,
    As per understanding you need to check one or few fields value is integer or not.
    You can achieve in 2 ways :
    Case1:Using inbuilt xml validation options.
    For 7.11 and below
    1)In ESR/Message type/Export the xsd to local machine.
    2)Insert the xsd file in the below loc
    /usr/sap/<sid>/DVEBMGS00/j2ee/cluster/server0/validation/schema/
    <guid>/<namespace1>/<service_interface_name>/<namespace2>
    <sid>: System ID of the server instance.
    <guid>: The GUID of the SWCV.
    <namespace1> : The namespace within which the service interface is defined.
    <service_interface_name> : The name of the service interface.
    <namespace2>
    : The namespace of the Message Type used by the service interface. In many
    instances, namespace1 and namespace2 are the same.
    Italic path folders need to create by you.
    For 7.3 and above
    Michal's PI tips: XML validation - changes in 7.3
    Case 2 :Handling using simple UDF.
    Input-->UDF-->Output
    try {
       Integer.parseInt(input);
       return input ;
    catch(NumberFormatException e) {   
    throw new StreamTransformationException( "Input field value for xyz field "+input+"is not in integer format.Plz correct it"); 
    Regards
    Venkat

  • File renaming in Sender file adapter usins OS command

    Hi Guys ,
    Can anyone explain on how to use the rename command in Sender file adapter using OS command parameter.
    Thanks,
    KC.

    Hey
    run the following OS command
    mv <originalFileName> <newFileName>
    This command will copy the <originalFileName> to a new file called <newFileName> and will delete the <originalFileName>
    There is no rename command in Unix,mv is used to rename the files
    Thanx
    Aamir

Maybe you are looking for

  • How to attach Documents in a query

    Hi expert, I would like to include some information (p.e. instructions) in a report in order to let the user see this additional information. We usually see the reports in Bex Analyzer (we don't use the Browser) Here is an example: Instructions: 1. R

  • Bug in JAXP or not?

    Hi all, I'm using JAXP 1.4 and JDK1.5_12, when I get to the following method I get the following exception: transformer.transform(source, result); Exception in thread "main" java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.parsers.XML1

  • First attempt to remove duplicate rows from a table...

    I have seen many people asking for a way to remove duplicate rows from data. I made up a fairly simple script. It adds a column to the table with the cell selected in it, and adds the concatenation of the data to the left into that new column. then i

  • EMIGALL - Installment Plan Error

    Hi ALL, While doing Installment Plan data migration system is giving the following error's and it is creating installment plan documents but the open item status is not getting  cleared. Error 1: The installment plan cannot be posted/changed Message

  • My Creative Cloud App won´t snyc my files.

    my Creative Cloud App won´t snyc my files.