class OofClient {

    @PostMapping("/{version:[vV][1]}")
    public ResponseEntity<String> callOof(@RequestBody OofRequest oofRequest) throws OofAdapterException {
        try {
            logger.debug("Received Request from BPEL {} ", oofRequest);
            String oofUrl = utils.getOofurl(oofRequest.getApiPath());
            HttpEntity<?> request = new HttpEntity<>(oofRequest.getRequestDetails(), utils.getOofHttpHeaders());
            ResponseEntity<String> response = restTemplate.postForEntity(oofUrl, request, String.class);
            logger.debug("Response from OOF : {} ", response);
            return response;
        } catch (Exception e) {
            logger.warn("Error while calling OOF {} {} ", e.getCause(), e.getMessage());
            throw new OofAdapterException(e);
        }
    }

}