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.

Similar Messages

  • 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/;')

  • 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

  • FTP adapter on BPEL

    I am using Oracle AS 10.1.3.1 on windows. My FTP server is also on Windows. But during invoke of outbound FTP adapter i am getting following error
    I am able to do FTP from AS machine to FTP server (Window) through command prompt and it is working fine.
    Error message
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>550</code>
    </part><part name="summary"><summary>file:/D:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_ProfileProcesTest_1.3_42d6d84ceee8de6430d37dfbfaa14936.tmp/FTP_To_OUT.wsdl Put_ptt::Put(Root-Element) - 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.
    </summary>
    </part><part name="detail"><detail>550 /FTPFolders/CUST_081210184025.txt: The system cannot find the path specified. </detail>
    </part></bindingFault>
    Defination of FTP Adapter is
    <definitions
    name="FTP_To_OUT"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/FTP_To_OUT/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/FTP_To_OUT/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:imp1="http://TargetNamespace.com/Read"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/ftp/"
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/" location="ftpAdapterOutboundHeader.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" >
    <import namespace="http://TargetNamespace.com/Read" schemaLocation="CUST_2007330181610_1.xsd" />
    </schema>
    </types>
    <message name="Root-Element_msg">
    <part name="Root-Element" element="imp1:Root-Element"/>
    </message>
    <portType name="Put_ptt">
    <operation name="Put">
    <input message="tns:Root-Element_msg"/>
    </operation>
    </portType>
    <binding name="Put_binding" type="tns:Put_ptt">
    <jca:binding />
    <operation name="Put">
    <jca:operation
    FileType="binary"
    PhysicalDirectory="FTPFolders"
    InteractionSpec="oracle.tip.adapter.ftp.outbound.FTPInteractionSpec"
    FileNamingConvention="CUST_%yyMMddHHmmss%.txt"
    NumberMessages="1"
    OpaqueSchema="false" >
    </jca:operation>
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    </operation>
    </binding>
    <service name="FTP_To_OUT">
    <port name="Put_pt" binding="tns:Put_binding">
    <jca:address location="eis/Ftp/FtpAdapter" />
    </port>
    </service>
    <plt:partnerLinkType name="Put_plt" >
    <plt:role name="Put_role" >
    <plt:portType name="tns:Put_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    Defination of OC4j-ra.xml is
    <?xml version="1.0"?>
    <oc4j-connector-factories xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.oracle.com/technology/oracleas/schema/oc4j-connector-factories-10_0.xsd" schema-major-version="10" schema-minor-version="0" >
    <imported-shared-libraries>
    <import-shared-library name="oracle.bpel.common"/>
    <import-shared-library name="oracle.xml"/>
    </imported-shared-libraries>
    <connector-factory location="eis/Ftp/FtpAdapter" connector-name="Ftp Adapter">
    <config-property name="host" value="10.zzz.yy.xxx"/>
    <config-property name="port" value="21"/>
    <config-property name="username" value="xxx"/>
    <config-property name="password" value="yyy"/>
    <config-property name="keepConnections" value="true"/>
    <config-property name="serverType" value="win"/>
    <config-property name="serverLocaleLanguage" value=""/>
    <config-property name="serverLocaleCountry" value=""/>
    <config-property name="serverLocaleVariant" value=""/>
    <config-property name="serverEncoding" value=""/>
    <config-property name="useFtps" value="false"/>
    <config-property name="walletLocation" value="C:\wallet\ewallet.p12"/>
    <config-property name="walletPassword" value="welcome1"/>
    <config-property name="channelMask" value="both"/>
    <config-property name="securePort" value="990"/>
    <config-property name="keyStoreProviderName" value=""/>
    <config-property name="keystoreType" value=""/>
    <config-property name="keystoreAlgorithm" value=""/>
    <config-property name="enableCipherSuits" value=""/>
    <config-property name="proxyHost" value=""/>
    <config-property name="proxyPort" value=""/>
    <config-property name="proxyUsername" value=""/>
    <config-property name="proxyPassword" value=""/>
    <config-property name="proxyType" value=""/>
    <config-property name="proxyDefinitionFile" value=""/>
    <config-property name="useProxy" value="false"/>
    <config-property name="useSftp" value="false"/>
    <config-property name="authenticationType" value="password"/>
    <config-property name="preferredKeyExchangeAlgorithm" value="diffie-hellman-group1-sha1"/>
    <config-property name="preferredCompressionAlgorithm" value="none"/>
    <config-property name="preferredDataIntegrityAlgorithm" value="hmac-md5"/>
    <config-property name="preferredPKIAlgorithm" value="ssh-rsa"/>
    <config-property name="privateKeyFile" value=""/>
    <config-property name="preferredCipherSuite" value="blowfish-cbc"/>
    <config-property name="transportProvider" value="socket"/>
    <connection-pooling use="none">
    </connection-pooling>
    <security-config use="none">
    </security-config>
    </connector-factory>
    </oc4j-connector-factories
    Edited by: user6408601 on Dec 10, 2008 6:03 AM

    Probably the Windows FTP server chokes on the path "/FTPFolders/CUST_081210184025.txt" as it uses Unix separators. You may need to use "\FTPFolders\CUST_081210184025.txt". I can't see the properties in the XML you have given, but when you configure the FTP adapter in the application server console there should be one field for the separator and one for the root folder. Both should be "\" rather than "/" on Windows. The default is "/".
    Good luck!

  • How to configure FTP Adapter in BPEL PM 10.1.2 Beta3?

    Greetings all!
    I am working on a legacy integration using BPEL PM. I need to use FTP adapter. There is little information in the Beta Documents on FTP Adapter. Can anyone point me to the right direction on how to configure the FTP Adapter, or where to find the document?
    Thanks in advance!

    For more documentation please send a mail to [email protected]

  • 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

  • BPEL process with FTP Adapter

    Hi,
    can we write static and dynamic data to file using FTP Adapter.
    for example:
    the file should be:
    the ABC file
    the total no of records:?
    Records:
    abc gskd dlfgpe
    asd fkgd sdfsd

    Hi,
    When you configure the FTP Adapter, you will be giving the location and also the name....
    But at run time, you can still replace them with the values you want....
    Go to the properties of invoke activity of FTP Adapter in BPEL....
    Find the properties, jca.ftp.FileName and jca.ftp.Directory; you can assign these properties from variables or expressions; it's all how want to do..you can design your flow in BPEL...
    And coming to the data contents; as yatan told, use the concat function in expression builder of copy operation in Assign activity and assign the same to the attribute of the FTP Adapter invoke input variable....
    Hope this helps...
    Thanks,
    N

  • FTP Adapter BPEL

    Can anyone help with how to use a FTP adapter in BPEL with the help of a simple example. I need the implementation with a simple example.

    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

  • How to find the File name using the FTP Adapter

    hi all,
    how to find the File name using the FTP Adapter with BPEL.
    Regards

    Found the solution for this.
    First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
    In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
    Thanks for the posts

  • 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

  • ESB FTP adapter tutorials

    I seen Oracle has many tutorials and this i like :) However im trying to setup a FTP adapter version of ESB and cant seem to find any tutorials on this specfically. If anyone could help me or maybe explain how i could edit a file adapter tutorial in which they have so that and FTP adapter could work that would be great

    Sorry I haven't tried it with ESB, but I do have a blog about "advanced use of FTP adapter" in BPEL: http://darwin-it.blogspot.com/2008/03/configuration-of-ftp-synchronous-get.html.
    I do think though that it should not be a very big problem to translate this to ESB, since it is actually the same adapter.
    Regards,
    Martien

  • 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.

Maybe you are looking for