Integration

Get Involved. Join the Conversation.

Topic

    Cesar Tepetla Corte
    How to read file using ICS file adapter
    Topic posted March 11, 2019 by Cesar Tepetla CorteBronze Medal: 1,250+ Points, tagged Adapters, Agent, API, Integration, Orchestration, REST, Web Services 
    157 Views, 6 Comments
    Title:
    How to read file using ICS file adapter
    Summary:
    Read a file from an FTP server using file adapter.
    Content:

    Hi everyone,

    I am working on an integration to read an FTP file I was previously working with the FTP adapter and this worked without problem but we have changed the server and due to security the only option they gave us was to use the file adapter.
    I created a small exercise to read a file but without success when I activate the integration it shows me a WSDL that when opening it tells me the error: "Error 503 - Service Unavailable
    From RFC 2068 Hypertext Transfer Protocol - HTTP / 1.1:
    503 Service Unavailable "

    Any opinions and comments are grateful.

    Regards,

    Bartholomew

     

    Comment

     

    • Hemanth Lakkaraju

      Are you using File Adapter as Invoke or Trigger here? What is the wsdl like after activation that is giving you 503?

      • Cesar Tepetla Corte

        Hi Hemanth,

        I'm using the file adapter as a trigger because only then does it give me the option to read.
        If the adapter is used as an invocation, it automatically gives me the option to write without having the option to change the operation.

        The generated wsdl is similar to this:
        https://identitydomain.integration.ocp.oraclecloud.com/ic/ws/integration/v1/flows/file/POLLFILE/1.0/?wsdl

        • Hemanth Lakkaraju

          File as trigger uses polling as an option. So the wsdl you are seeing need not be an active endpoint to use which is cause for 503. Once the flow is activated, the poller from agent should be able to poll the files in directory read accordingly. Do you see any error in the agent logs during polling?

          • Cesar Tepetla Corte

            I tested the integration and it works this was just a test example, I have an integration that writes to the FTP server with the file adapter.

            Now to read the file I must use the same adapter but the drawback is that to be able to read it must be as you just mentioned it as trigger, what could I do about it?

            • Hemanth Lakkaraju

              If I understand correctly, your only option to write or read the file to FTP location is by using file adapter. In that case, you may need to break the integration logic. Integration1 to have logic until the file is written. Integration2 to have file adapter trigger to read from the location written by file adapter in integration1 and have the rest of logic. Hope this helps!

    • Arabinda Chakraborty

      I am assuming you have certain FOLDER (Incoming / Outgoing) created in the FTP Server and File is placed. Check that you have the required access . You can use open source tools like FileZilla to check this.  

      I am also assuming you have created CONNECTION to FTP Server and successfully connected. After that you can create a Schedule Integration with Orchestration and try reading the file.