RA Webservice REST v4 unable to download zip files
search cancel

RA Webservice REST v4 unable to download zip files


Article ID: 191114


Updated On:


CA Automic Workload Automation - Automation Engine


In previous RA Webservice (v3), it is able to download ZIP files.
However, with later WEBSERVICEREST v4, the downloaded zip file is always corrupted.


2020-02-04 11:23:40             Connect timeout set to 30 seconds
2020-02-04 11:23:40             Read timeout set to:60
2020-02-04 11:23:40             setting http proxy: host: 8080
2020-02-04 11:23:40             Using connection:CONN.REST#AWR
2020-02-04 11:23:40             Authentication type:Basic
2020-02-04 11:23:40             Using URI Override:https://www.xxx.xx/SubDl/index.jsp?user={user}&pass={password}&path=xxx/xxx/xxx.zip
2020-02-04 11:23:40             Request:GET https://www.xxx.xx/SubDl/index.jsp%3Fuser={user}&pass={password}&path=xxx/xxx/xxx.zip
2020-02-04 11:23:40             Request headers:{}
2020-02-04 11:23:40             Sending request...
2020-02-04 11:23:41             Response:
2020-02-04 11:23:41             Status:200 OK
2020-02-04 11:23:41             Response headers:[Date:[Tue, 04 Feb 2020 10:21:27 GMT], Server:[Apache/2.4.25], Strict-Transport-Security:[max-age=31536000; includeSubDomains], Set-Cookie:[JSESSIONID=xxx; Path=/; Secure; HttpOnly], Content-Disposition:[attachment; filename=xxx.zip], Content-Length:[456957], Content-Type:[application/zip]]
2020-02-04 11:23:42             Response to file:/opt/xxx/xxx/xxx.zip
2020-02-04 11:23:42             RESTful job complete


Release : 12.3

Component : Webservice REST v4


By Design


*Behavior is by design*

Between version 3.X and version 4.X of the Webservice components the Webservice was divided in two - WebserviceREST and WebserviceSOAP.
These are completely new applications - and should not be considered as a major upgrade.

The problem in this case is the WebserviceREST was designed mostly for accessing text-based files - text, xml or json, and NOT for downloading files.
For downloading files there is the RA.FTP component.

As a solution we can recommend to use cURL instead of the Request Sheet for downloading files.
Another option is to configure an OS specific job and use wget to download the files.
There is no other way at the moment.