Hello, Our system is an Java application which integrates with Dynamics CRM, in the last few years we haven`t made any change, from last week, the following API is broken. I have two issues.
First issue, since we haven`t made any change, but the API is broken, I believe Dynamics must have made some change on their end.
String url = "https://{client name}.crm.dynamics.com/api/data/v9.1.0.6228/z2t_models?fetchXml=";
restTemplate.exchange(url, HttpMethod.GET, entity, String.class);
The API returns 500 internal error, the error message of response:
{"error":{"code":"0x0","message":"Unexpected character encountered while parsing value: \ufffd. Path '', line 0, position 0."}}
But I can call this API successfully using postman, it isn`t helpful from the error message. I am wondering what change I should make in order to call this API successfully.
Second issue, I made some change, removed the parameters from original url, and sent the parameters in the exchange method, for example,
String url = "https://{client name}.crm.dynamics.com/api/data/v9.1.0.6228/z2t_models";
String param = "";
Map params = new HashMap<>();
params.put("fetchXml", param);
restTemplate.exchange(url, HttpMethod.GET, entity, String.class, params);
It returns 200, but it returns a lot more information in response body which will causes out of memory issue on our end.
I will appreciate any help here, thanks!