A REST adapter call is failing resulting in errors: FOC44540 Web Services Request got error


Diagnostics

Product: DataMigrator
Release: 8205
Primary OS: Windows
Solution Date:

Symptom

(FOC44540) Web Services Request got error. Response Status  : 400 ; Reason:  Bad Request URL: https://xxxx?product=regfox.com&pretty=true&dateCreatedAfter=2019-04-22T04%3A00%3A
(ICM18040) Return Code = 44540  
(ICM18076) Request: kris_testing/wcx_utc_offset/wcx_transactions_to_staging_df - finished processing 
(ICM18007) CPU Time : 2469

Problem

A REST adapter call is failing resulting in the error messages above.

Solution

In the URL, a variable is used that is resolved at runtime. This value is incorrect and is causing the issue. For example: &dateCreatedAfter=2019-04-22T04%3A00%3A

The code that generates the value should be corrected. For example, the following code:

(T2.DATECREATEDAFTER = (SELECT REPLACE(CAST(CAST(SQ.LAST_PROCESSED_DATE  AS DATE)  AS VARCHAR(10 ) ) , '/' , '-' )  || 'T04:00:00.00000000Z' 

Should be changed to:

 (T2.DATECREATEDAFTER = (SELECT CHAR((DATE(SQ.LAST_PROCESSED_DATE)), JIS)  || 'T04:00:00.00000000Z'