2 Replies Latest reply on Oct 23, 2009 4:24 AM by 664685

    FTP pull using  ALSB

      I was developing a senario that: ALSB will read a text file using FTP and will write some data in a text file using FTP and store that file in some other location.

      To write in a file using I was using following credentials :
      Any XML Service type(for business service)
      Endpoint URI :- "ftp://localhost:21/ftp_out"
      Service Account :- MortgageBroker/FTP Account

      as a result I am getting a file in the ftp_out folder but the file is in right format and file name is like x2466594902975505375--6720b292.121c94b2e00.-759fd and it's of " -759FD File".

      Please help me in creating file with proper name and with valid data.

      Thanks in advance for help.
        • 1. Re: FTP pull using  ALSB
          The file JCA will insist on unique names. Each message has a unique ID and that's what you see as part of the file-name. If this is not the functionality you want, you'll have to create your own JCA. You can try to overwrite the ID in the header before sending the data, but I somehow doubt OSB will allow you to do so.

          If you don't do unique names, you cannot handle parallel calls, or calls where you push files faster than the receiving system can grab them.

          That said, your problem is easily fixed on the receiving end. Simply look for any file in the receiving directory - for instance using 'FOR" in a shell script.
          • 2. Re: FTP pull using  ALSB
            This solution might help you. There are two parts to it:

            a. File name / extension @ design time: To get a uniform file extension, you can configure the properties - Prefix for destination File Name and Suffix for Destination File Name which are available when you create your Business Service in the FTP Transport Configuration Tab / Page. By default these are blank, whcih causes ALSB to give unique ID names to the files

            b. File name / extension @ run time: You can also choose to specify the file name and extension from the Proxy Service Message flow, from where you are actually calling the above Business Service. This can be done in the following ways

            i. If you are uisng a Route node and a routing action, then include a "Transport Header" node inside the routing action. Select "Outboubd Request" and then select "Add Headers" and then select "ftp" and "fileName" besides the radio button marked as "defined". In the corresponding "Action", you can select <expression> to enter your own expression that evaluates to the filename

            ii. If you are using a Stage node and Publish or service callout node, then also you can include a "Transport Header" node and repeat the above steps

            Regarding the data format error, it would help if you can specify what kind of file you are reading (XML / text / others). Sometimes, configuring the request / response encoding in Proxy Service (used to read the file) and Business Service also helps

            Thanks & Regards