Integration

Get Involved. Join the Conversation.

Topic

    Abhinav Kumar
    Integration-AIC
    Topic posted August 20, 2019 by Abhinav KumarRed Ribbon: 250+ Points, tagged Integration, Mapping 
    36 Views, 5 Comments
    Title:
    Integration-AIC
    Content:

    By listing from FTP adapter, I got several filenames. I want to read any one file.

    Comment

     

    • Mani

      You might want to elaborate the problem/use case. It is not clear from your statement 

    • Abhinav Kumar

      While doing list file for certain file pattern, I got this response from the list file.

      <ListFileResponse xmlns="http://xmlns.oracle.com/cloud/adapter/ftp/ListFileFromEDelivery_REQUEST/types"> <ListResponse xmlns="http://xmlns.oracle.com/cloud/list/pull"> <position>1566209460000</position> <ItemCount>2</ItemCount> <FileList> <File> <directory>/ftlint/inbound/financial/tenv6/activedir</directory> <filename>Test1.csv</filename> <lastModifiedTime>1566209400000</lastModifiedTime> <creationTime>0</creationTime> <size>11454</size> </File> <File> <directory>/ftlint/inbound/financial/tenv6/activedir</directory> <filename>Test2.csv</filename> <lastModifiedTime>1566209460000</lastModifiedTime> <creationTime>0</creationTime> <size>860</size> </File> </FileList> </ListResponse></ListFileResponse>

      From this response, I want to read only one file name. I have directly mapped this filename to Read File in FTP adapter. As a result, both the file names got mapped. I want only one file name to process.

      • Mani

        Have a for loop to iterate the response of list operation. inside for loop, you can add a Switch to code a condition on which to process file.

      • Kanchankumar Khedkar

        if your requirement is to read any one file you can use the axis specifier.

        e.g. /ListOfResponse/ListResponse/FileList/File[1]/filename 

        This will always pick first file in response.