Hello.
In the documentation for UTL_HTTP, it states that FTP requests are supported by using an HTTP proxy server:
"Other Internet-related data-access protocols (such as the File Transfer Protocol (FTP) or the Gopher protocol) are also supported using an HTTP proxy server that supports those protocols."
Is there a proxy service available that will translate my HTTP request to the FTP server? All I am trying to do is figure out a way to check if specific files exist on an FTP server, using read-only anonymous permissions. So I want to use the following code to check for the existence of a file, using 'ftp://' instead of 'http://'. A browser that download the file. Windows Explorer can download the file. Why can I not get PL/SQL to download the file, or atleast check to see if it's there? I'm trying to avoid using a thirdparty PL/SQL package.
DECLARE
url VARCHAR2(256) := 'ftp://myftp.myftpserver.com/pub/test.txt';
username VARCHAR2(256);
password VARCHAR2(256);
req UTL_HTTP.REQ;
resp UTL_HTTP.RESP;
BEGIN
req := UTL_HTTP.BEGIN_REQUEST(url);
IF (username IS NOT NULL) THEN
UTL_HTTP.SET_AUTHENTICATION(req, username, password);
END IF;
resp := UTL_HTTP.GET_RESPONSE(req);
DBMS_OUTPUT.PUT_LINE('response -->' || resp.status_code);
END;
Please let me know what proxy service I need to install and how it should be configured. Otherwise, is there a simple way for me to check the existence of files on an FTP server without the installation of a thirdparty library?
Thanks!