Skip to main content

Hello Community,

Attached is @dsj’s useful post. This post has helped many people solve problems.

We use ftp server in the edm locations of our documents. Therefore, all our digital documents are stored on our FTP server. 
When I use batch_transfer_handler_api.download_from_ftp to send mail these documents from IFS EE, I get the following error.

DECLARE
error_msg_ VARCHAR2(4000);
BEGIN
error_msg_ := NULL;
batch_transfer_handler_api.download_from_ftp(
error_msg_ => error_msg_,
local_file_name_ => '/FTP/2022/JAN/DOC-1000162-1-REV01-1.PDF',
file_name_ => '/FTP/2022/JAN/DOC-1000162-1-REV01-1.PDF',
address_ => '<ftp_server_ip>',
user_ => '<ftp_connect_username>',
password_ => '<ftp_connect_user_pwd>',
port_ => 21,
send_password_ => TRUE
);
IF (error_msg_ IS NOT NULL) THEN
dbms_output.put_line('error_msg_: ' || error_msg_);
END IF;
END;

Output:

error_msg_: ORA-20105: WebServicesUtil.readFromFtp: Failed to download file from Ftp server rLogin incorrect.]

 

Regards,

Barış

Hi @baris.halici,

 

Thanks for the nice feedback :)

I have not tried with FTP but if the documents in the repository can be viewed from IFS without getting the same error, maybe worth trying b64 encoded password instead of plain text .

you can get the it from edm basic - repository address and user as follows.

EDM_LOCATION_USER_API.GET_LOCATION_PASSWORD_BASE64(:Repository_Address);

Hope it works!

Damith


Yesss @dsj! You are great! Thanks bro!

It’s worked.

edm_location_user_api.get_location_password('<ftp_server_ip>');

base64 didn’t work..


Hi @dsj ,

I was trying to use the  Batch_Transfer_Handler_Api.Download_From_Ftp() method to get the files from FTP, sinse in my case the customer is using FTP.

and getting ORA-20105: PlsqlapServer.ERRINV: XMLREADER_TEXTELEM:Cannot read XML text content at 1:280]: Illegal character ((CTRL-CHAR, code 31))
 at Ârow,col {unknown-source}]: e1,281] 
Caused by: ifs.fnd.base.ParseException: XMLREADER_TEXTELEM:Cannot read XML text content at n1:280]: Illegal character ((CTRL-CHAR, code 31))
 at /row,col {unknown-source}]: r1,281] 
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR, code 31))
 at rrow,col {unknown-source}]: o1,281]

The MESSAGE_REQUEST.xml has the FTP password in place 281.

The password has some characters like !,$,#

Is it not allowed to have the special characters in the password?


Hi @InnChathI 

Special characters are allowed in the password. 

Did you use the "get_location_password" method in my previous post?


Hi @baris.halici ,

Yes I used get_location_password() to fetch the password, and it returns encripted password with characters like square  
for ex as below: 

I tried after changing the password wihthout these square characters, and it worked.

Thank you!


Reply