RA Agent - WEBSERVICEREST downloads PDF file with wrong encoding
search cancel

RA Agent - WEBSERVICEREST downloads PDF file with wrong encoding

book

Article ID: 234345

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Downloaded a pdf file from an API with curl:

curl --location \--request 'GET' \--header 'Authorization: Basic ZjVlZmIwODYtZDQwOS00OWZiLWE5O' \--output MY_PDF_FROM_CURL_COMMAND.pdf \'https://app-xxxxxxx.com/filetransfer/document?fileName=f5efb086-d409-49fb-a982-4aa8f158dc59.pdf&directoryType=TEST'​

That works fine an the pdf has the following md5-hash:

MD5(MY_PDF_FROM_CURL_COMMAND.pdf)= d933504813437908868fd3ee0906d0a7

But when using the RA-Webservice REST Job, I get another checksum after the download over the RA Job.

Environment

Release : 12.2

Component :

Resolution

This is working as designed. The rest agent receives the file from the endpoint and saves it as a UTF-8 String. This is causing the issue.

The workaround solution suggested is to use curl.

Changing this behavior might have a huge impact on current behavior while using the REST agent.