Getting filename in FTP Adapter in ESB

I am trying to get the filename on an inbound FTP adapter in an ESB. I've followed the directions I have found, by following these steps:
1. The namespace xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions" is automatically generated in the xsl file.
2. Create a variable in the xsl file, with value ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName','fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;'). Let's give it the name INFILENAME.
3. Reference the variable in some expression in the xsl file: $INFILENAME
4.Set UseHeaders="true" in the FTP inbound wsdl file
When I do this in a file adapter, I can use the value. When I do this in an ftp adapter, no value comes back.
Any ideas?

Yes, that did it, thanks. I had a typo:
getRequestHeader('/fhdr:InboundFtpHeaderType/fhdr:fileName,'fhdr=http://xmlns.oracle.com/pcbpel/adapter/ftp/;')
which should have had "FTP" in upper case. The correct code is as you stated:
getRequestHeader('/fhdr:InboundFTPHeaderType/fhdr:fileName,'fhdr=http://xmlns.oracle.com/pcbpel/adapter/ftp/;')

Similar Messages

  • Getting filename in FTP Adapter in BPEL

    How to retrieve the filename read by the FTP adapter in ora-bpel?

    Just figured out how to do this.
    1. Create a variable of type 'InboundHeader_msg' defined in 'ftpAdapterInboundHeader.wsdl'.
    2. Reference this in the 'Adapters' tab of the FTP adapter receive activity.

  • Get-order of FTP-adapter (bpel/esb)

    Hello,
    Is it possible to change or influence the order of getting files, i.e. get files by oldest creation date?
    Scenario:
    I'm using an FTP-adapter in a bpel process to get files. The interval is set to 1 minute. However, sometimes files are created within the 1 minute time-frame. The order of the files is very important in the scenario: the older file must be processed before the newer file by the bpel process. I've looked for any settings in the FTP adapter to influence the get-order, but without any success so far. Can anyone please help?
    Kind regards,
    Harm

    You can find some samples on these links:
    http://java.net/projects/oraclesoasuite11g/pages/FTPAdapters
    http://niallcblogs.blogspot.com/2011/07/soa-suite-11g-ftp-adapter.html

  • Unable to Create FTP Adapter + Oracle ESB

    Hi,
    Following is the scenario in Oracle ESB:-------
    I created one FILE Adapter for reading file from directory and FTP Adapter to put that file to FTP site in Oracle ESB.
    When i checked in the ESB console File was getting picked up by the FILE ADAPTER but unable to put on the FTP Site.
    Could any one please tell me what should i suppose to enter in the field of "Directory for Outgoing Files (physical path):" and what should i select "Physical Path" OR "logical path" i.e in STEP 4
    I have given all access to FTP site i.e READ/WRITE
    Following is the error message i am getting in Oracle ESB Console for the same....
    Could any one please suggest some thing???
    An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: esb:///ESB_Projects/Application1_Project2/FTP_Adapter.wsdl Put_ptt::Put(opaque) - WSIF JCA Execute of operation 'Put' failed due to: Error sending file to FTP Server. Unable to send file to server. ; nested exception is: ORABPEL-11429 Error sending file to FTP Server. Unable to send file to server. Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space. at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:623) at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:726) at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(Unknown Source) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(Unknown Source) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(Unknown Source) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(Unknown Source) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(Unknown Source) at oracle.tip.esb.server.dispatch.BusinessEvent.raise(Unknown Source) at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(Unknown Source) at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(Unknown Source) at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(Unknown Source) at oracle.tip

    Hi JTaylor,
    I am still unable to find FtpAdapter in the EM (Enterprise Manager) so can't find/change the entry for "eis/Ftp/FtpAdapter"
    Following are the some application which are already in my EM.
    Applications:-
    ascontrol, ccore, coreman, datatags, default, esb-dt, esb-rt,
    gateway, hw_services, javasso, orabpel, orainfra, policymanager, ruleauthor ,
    rulehelp , WSIL-App
    Still i am getting the following error which is related to step 2. Entry in the step 2 & oc4j-ra.xml is the same i.2
    ""eis/Ftp/FtpAdapter"
    An unhandled exception has been thrown in the ESB system. The exception reported
    is: "org.collaxa.thirdparty.apache.wsif.WSIFException:
    esb:///ESB_Projects/Application1_Project2/FTP_Adapter.wsdl [
    Put_ptt::Put(opaque) ] - WSIF JCA Execute of operation 'Put' failed due to:
    Adapter Framework unable to create outbound JCA connection.
    esb:///ESB_Projects/Application1_Project2/FTP_Adapter.wsdl [
    Put_ptt::Put(opaque) ] - : The Adapter Framework was unable to establish an
    outbound JCA connection due to the following issue: ORABPEL-12510 Unable to
    locate the JCA Resource Adapter via WSDL port element jca:address. The Adapter
    Framework is unable to startup the Resource Adapter specified in the WSDL
    jca:address element: location='eis/Ftp/FtpAdapter'. The reason for this is most
    likely that either 1) the Resource Adapters RAR file has not been deployed
    successfully to the OC4J Application server or 2) the 'location' attribute in
    $J2EE_HOME/application-deployments/default/deployed-adapter-name/oc4j-ra.xml has
    not been set to eis/Ftp/FtpAdapter. In the last case you might have to add a new
    'connector-factory' entry (connection) to oc4j-ra.xml. Please correct this and
    then restart the BPEL/OC4J Application Server ; nested exception is:
    ORABPEL-12511 Adapter Framework unable to create outbound JCA connection.
    esb:///ESB_Projects/Application1_Project2/FTP_Adapter.wsdl [
    Put_ptt::Put(opaque) ] - : The Adapter Framework was unable to establish an
    outbound JCA connection due to the following issue: ORABPEL-12510 Unable to
    locate the JCA Resource Adapter via WSDL port element jca:address. The Adapter
    Framework is unable to startup the Resource Adapter specified in the WSDL
    jca:address element: location='eis/Ftp/FtpAdapter'. The reason for this is most
    likely that either 1) the Resource Adapters RAR file has not been deployed
    successfully to the OC4J Application server or 2) the 'location' attribute in
    $J2EE_HOME/application-deployments/default/deployed-adapter-name/oc4j-
    Could please give me u r e-mail id so i can send some snap shot to u ? So it would be greate help for me to solve this problem.
    Thanks & Regards
    Shivraj

  • Ftp Adapter in ESB Control

    Where do I need to configure the JNDI-location of my ftp-adapter when working with an esb control?
    If I deploy my esb process now i'm getting a WSIFException because he can't find the configuration settings for the ftp adapter.

    When I try to use the same functionality, the ftp adapter, in bpel I'm facing the same behaviour. There is something wrong with the configuration of the oc4j-ra.xml file?
    The errostack:
    file:/C:/product/SoaSuite/10.1.3.1/OracleAS/bpel/domains/default/tmp/.bpel_BPELProcess1_1.0_c64929dfd2dacf95db3c9da081c1797d.tmp/put.wsdl [ Put_ptt::Put(DVD) ] - WSIF JCA Execute of operation 'Put' failed due to: Adapter Framework unable to create outbound JCA connection.
    file:/C:/product/SoaSuite/10.1.3.1/OracleAS/bpel/domains/default/tmp/.bpel_BPELProcess1_1.0_c64929dfd2dacf95db3c9da081c1797d.tmp/put.wsdl [ Put_ptt::Put(DVD) ] - : The Adapter Framework was unable to establish an outbound JCA connection due to the following issue: ORABPEL-12510
    Unable to locate the JCA Resource Adapter via WSDL port element jca:address.
    The Adapter Framework is unable to startup the Resource Adapter specified in the WSDL jca:address element: location='eis/Ftp/FtpAdapter'.
    The reason for this is most likely that either
    1) the Resource Adapters RAR file has not been deployed successfully to the OC4J Application server or
    2) the 'location' attribute in $J2EE_HOME/application-deployments/default/deployed-adapter-name/oc4j-ra.xml has not been set to eis/Ftp/FtpAdapter. In the last case you might have to add a new 'connector-factory' entry (connection) to oc4j-ra.xml.
    Please correct this and then restart the BPEL/OC4J Application Server

  • Writing timestamp on the content of file (not the filename) using FTP Adapt

    Hi Experts,
    Is it possible to write a timestamp (from the source server) to a target logfile if I'll use FTP Adapter?
    Here the scenario:
    Source:
    source.log -> the contents is AAAA (the timestamp base from the server is [06/09/10 10:00])
    - basically the source.log file is overwritten with the same content but the timestamp is changed so that's would be scenario
    it will checked by the FTP adapter....
    Target:
    target.log -> the content of the file is 06/09/10 10:00
    so probably if i have a target logfile I'll just have to append the file as this
    06/09/10 10:00
    06/09/10 10:02
    06/09/10 10:04
    06/09/10 10:06
    06/09/10 10:08
    06/09/10 10:10
    If it's possible, how will I do this? Do I need script? or just normal settings of the FTP adapter?
    R-jay

    Yes, is posibble. if i not wrong, you can do this ussing Dynamic configuration.
    see those links
    /people/ryan.crosby/blog/2009/02/27/file-xi-proxy-scenario--moving-binary-files-with-accompanying-filename-attribute-in-converted-xstring-format
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    Thanks
    RP

  • Rename Filename using FTP adapter

    Hi All,
    I have a simple file to file scenario with renaming the filename of the file at the target.
    Source Filename - ABC
    Target Filename (Expected) - ABC_pqr
    I am using adapter specific message attributes to generate filename as '%filename%_pqr' as target filename, but only the filename 'ABC' appears in the target filename and additional '_pqr' is neglected.
    Is there a way by which this can be achieved? I know, there is a option of using OS Command to rename the file at source and than use the filename.
    Are there any other options, by which it can be achieved?
    Thanks for your help in advance.
    Regards,
    Ashish

    Hi Ashish,
    Use Dynamic configuration. Here is the Code: Map to the target root node.
    public String Filename(String a,Container container)
      String b;                                                 // Target file Name
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    b =  /* Here the condition to rename the file
    conf.put(keyHeader1, b);
    return "";
    Thanks,

  • Filename with FTP adapter

    Hi,
    Is there any one who knows how to specify the filename dynamicly in the File Adapter?.
    I can only see that i can specify the filename as a constant and just add a time stamp. But the case is that i need to specify the name dynamicly using some data from the payload.
    /Jakob

    Hi Boris,
    You are right. I checked with some my friends in SAP and they told me right now its possible only to manuplate the payload.
    One other solution for this problem is to do post processing. For example write your files using MessageID or counter as "File construction mode" and then call a batch pgm or some pgm using "Operating system command" from the receiver file adapter which renames all the files written to a particular folder.
    Regards,
    Sridhar

  • Change FileName File/FTP Adapter

    Hi all,
    I have a simple scenario File-To-File there is no mapping,so i've created it directly on Integration Directory, like this : https://wiki.sdn.sap.com/wiki/display/XI/FiletofilewithoutusingwithIntegration+Repository
    I've have a requirement to change the file name to be saved by Receiver in accordance with a complex logic.
    I know that the FileName variable can be manipulated like this: /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    But in my scenario I have no mapping, so I'm thinking about to implement a Module to change the FileName to be saved.
    Does anybody suggest another way? Or implement a module is the best solution for this case?
    I'm using PI 7.1
    Best regards

    Hi all,
    The requirement to change file name was changed and now I can calculate the new name after file has been saved on target directory, so my solution was to create a java program that contains this logic and the code to rename file. Now after processing I'm calling this program and works fine.
    Best regards

  • File Matching with FTP Adapter

    Guys,
    I have particular requirement where FTP Adapter needs to read set of files
    FILENAME.PCL
    FILENAME.I01
    the file name would be matching but extensions are different.
    the adapter needs to read the file match if they are SET of files ( based on file name) and move into target directory if not move into Error Directory .The Data needs some manipulation before it's written into target location so we are using ESB ( also for error notification) is it possible with FTP Adapter within ESB?
    Thanks

    May be difficult with ESB, may require BPEL. Can you give a specific example as that would make it easier to see what you mean.
    Antony

  • Issue in invoking a BPEL process (having a DB Adapter) from ESB

    Dear All,
    I am having an issue while invoking a ESB process (Batch file mode) which inturn will call a second BPEL process which will invoke the Oracle APPS standard API ego_item_pub.process_items to create an item in Inventocry, through a DB adapter
    I am able to create the Item and API is working when I pass the input XML through the second BPEL process.
    But when invoking through the ESB process which will invoke the BPEL process, based on the polling to the batch file from the ESB. This is done through an FTP adapter in ESB.
    The Issue is that while invoking from ESB, through batch file. The PL/SQL API is throwing error from the standard API 'ego_item_pub.process_items'
    But it works fine if I invoke the BPEL process individually.
    What might be the problem for this and how can I fix this..
    Please update..
    Many thanks in advance ...

    Hi,
    We tried the same thing and it worked for us. In our scenario we had a BPEL process calling a ESB and then this ESB calling another BPEL process which inturn calls the API. I agree with James it seems more of a Data issue/or your XSD is not proper i.e the XSD that you ESB process is having. If you have created a ESB and then changed the BPEL process afterward the issue you mentioned will come. Please run the process in DEBIG mode and provide the domain.log file.
    Regards
    Sahil
    http://soab2bsahil.blogspot.com

  • SOA 10g: Dynamic Host Name and Port in FTP Adapter

    Hello All,
    I am using GET operation in FTP Adapter. I wanted to make Hostname,portName,Username and Password Dynamic.
    Pls suggest how to achieve this in SOA 10g.
    thanks,
    Ab

    or http://blogs.oracle.com/adapters/2010/04/changing_the_connection_factory_jndi_dynamically_in_ftp_adapter.html
    the make the jndi dynamic, but you still have to setup all the jndi lookups before you can dynamically can change them

  • How to read files sequentially from FTP adapter

    Hi,
    My requirement is to read files sequentially based on file name from the FTP server using a ftp adapter in ESB.
    for example the if the file names are
    1001.dat
    1000.dat
    1002.dat
    then it should read the files in in the order 1000.dat , 1001.dat and 1002.dat
    Could you please help me out in this.

    did u fid any possibilities for this i too have a same requirement if you had foud it can you please help me

  • FTP Adapter : Issue with Non English Text.

    Dear All,
    We are trying to read a file which contains Korean Language and write into a different folder in a CSV format.
    The output file contains "???" inplace of Korean text.
    We can see the invoke to FTP adapter contains Korean text as part of it's input. But the CSV file contains "???"
    <FinalTradeCardList>
    <imp1:FinalRows>
    <imp1:C1>NO</imp1:C1>
    <imp1:C2>사이트코드</imp1:C2>
    <imp1:C3>사이트명</imp1:C3>
    <imp1:C4>승인일자</imp1:C4>
    <imp1:C5>주문번호</imp1:C5>
    <imp1:C6>주문자</imp1:C6>
    <imp1:C7>주문자연락처</imp1:C7>
    <imp1:C8>카드종류</imp1:C8>
    <imp1:C9>승인번호</imp1:C9>
    <imp1:C10>거래상태</imp1:C10>
    <imp1:C11>거래상태일시</imp1:C11>
    <imp1:C12>할부</imp1:C12>
    <imp1:C13>거래금액</imp1:C13>
    <imp1:C14>비과세공급가액</imp1:C14>
    <imp1:C15>과세공급가액</imp1:C15>
    </imp1:FinalRows>
    </FinalTradeCardList>
    What needs to be done in BPEL to get Korean Language text in CSV file.
    Thanks,
    Sid.

    Thanks for your reply.
    I used the character set as you suggested.But it is not getting converted correctly.
    Actual Value : (유)라이프테크놀로지스코리아
    Converted Value : ( $)C @/ ) 6s@LGAEWE)3n7NAv=:DZ8.>F
    I tried all others that are mentioned in the document. Still i am seeing different values. I am not getting the actual value.
    But in BPEL i see correct value getting passed to FTP Adapter.
    The character set is in XSD. Please find it below..
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
                xmlns:tns="http://TargetNamespace.com/DeleteMe"
                targetNamespace="http://TargetNamespace.com/DeleteMe"
                elementFormDefault="qualified"
                attributeFormDefault="unqualified"
                nxsd:version="NXSD"
                nxsd:stream="chars"
                nxsd:encoding="ISO-2022-KR">
      <xsd:element name="Root-Element">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="Row" minOccurs="1" maxOccurs="unbounded">
              <xsd:complexType>
                <xsd:sequence>
                  <xsd:element name="C1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
                  <xsd:element name="C2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;" />
                </xsd:sequence>
              </xsd:complexType>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    Please review the above and help me in resolving this issue.
    Thanks,
    Sid.

  • FTP Adapter - 10.1.3.3 -Urgent !!!

    Hi,
    I am trying to configure get operation for FTP adapter (SOA Suite 10.1.3.3./ Jdev 10.1.3.3). Created an empty BPEL project, created a partner link and configured receive activiyt to invoke this PL and then rest of the steps.
    After deploying the process, it successfully gets the file from server (as files are getting deleted from FTP server) but does not invoke rest of the process and below given error is thrown. Please help me in fixing this error.
    Cannot find partnerLinkType 2.
    PartnerLinkType "{http://xmlns.oracle.com/pcbpel/adapter/ftp/pl_get/}Get_plt" is not found in WSDL at "file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_Test_get_1.0_628532faf224f53a82e754e3a3c213a8.tmp/_Test_get.wsdl".
    Please make sure the partnerLinkType is defined in the WSDL.
    I have successfully tested FTPDebatching sample and it works fine.
    Regards
    Arvind Aggarwal

    We had a similar problem trying to manually create an instance in the BPEL Developer console. Error Message:
    Cannot find partnerLinkType 2.
    PartnerLinkType "{http://xmlns.oracle.com/pcbpel/adapter/jms/xxxx/}Consume_Message_plt" is not found in WSDL at "file:/apps/xxxx/soa/oas/10.1.3.3/bpel/domains/default/tmp/.bpel_xxxx_1.0_79156ff6ad650c64ae4e60d46e906836.tmp/_xxxx.wsdl".
    Please make sure the partnerLinkType is defined in the WSDL.
    Solution: Clear the WSDL Cache in the console.

Maybe you are looking for

  • HT204053 My wife and me are using the same apple id on our ipads, can we have separate icloud accounts?

    I want to know if you can have a separate icloud account on your ipad, the account is in my wife's apple id, i want a separate icloud account on my ipad.

  • PSE 7 log in error 400.

    I am not able to sign into my photoshop account from the photoshop elements 7 home screen. I keep my photos on 2 seperate computers and I need them to remain in sync with each other. I am able to sign on to my account on one computer without any prob

  • BPM + MDM Multi record creation

    Hi everyone! We are developing Master Data Governance scenario with MDM + BPM. The key concept is creation, update and approval of MDM record in a BPM process. Tasks are human based. So we came upon the following question. Is it possible somehow to m

  • Since downloading newest itunes I can't transfer podcasts from desktop to ipod. ***??

    I got the newest itunes version and since then when I download a podcast to my desktop I can't transfer it to my ipod. I used to drag it over with no problem. Now I just get the circle with a line. Can't open on itunes, can't put it in music library.

  • Can't import into Vista

    Hi! I have had a problem with iTunes for three months now. Argh! I am having trouble importing cds and having them actually work in my library. When the songs are done "importing" the end time is listed as 789:00:00 or something like that. (They won'