What product/components do you use and which version/fix level are you on?
C8Y MS SDK 1009.0.12
Is your question related to the free trial, or to a production (customer) instance?
What are you trying to achieve? Please describe it in detail.
Basically, trying to replace Spring Framework’s RestTemplate implementation with RestConnector managed by the microservice SDK. (Cumulocity IoT SDK/Java client supports /group/* API methods? - #4 by Harald_Meyer)
We are trying to replicate below piece of code:
@Autowired
private PlatformRestTemplate restTemplate; // PlatformRestTemplate extends RestTemplate
private ResponseEntity<?> validateRuleInApama(RuleValidationRequest ruleValidationRequest)
{
HttpEntity<RuleValidationRequest> requestEntity = new HttpEntity<>(ruleValidationRequest);
ResponseEntity<RuleValidationResponse> responseEntity = restTemplate.exchange(apamaUrl + "/validator/rule", HttpMethod.POST, requestEntity, RuleValidationResponse.class);
return responseEntity;
}
The post methods from RestConnector instance accept a common request and response instance types cumulocity-clients-java/java-client/src/main/java/com/cumulocity/sdk/client/RestConnector.java at develop · Cumulocity-IoT/cumulocity-clients-java · GitHub but not flexible as above.
Looking for corresponding classes/methods in the java client! Maybe they are added in a more recent version of the client?
–
Best,
Rahul