diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java | 13 |
2 files changed, 3 insertions, 12 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java index f1446084..7f79a04c 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiService.java @@ -106,5 +106,5 @@ public interface DmiService { * @return response from sdnc */ String writeResourceDataPassthroughForCmHandle(String cmHandle, String resourceIdentifier, String dataType, - Object data); + String data); }
\ No newline at end of file diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java index 216190e3..87936bb7 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java @@ -207,18 +207,9 @@ public class DmiServiceImpl implements DmiService { @Override public String writeResourceDataPassthroughForCmHandle(final String cmHandle, final String resourceIdentifier, - final String dataType, final Object data) { - final String jsonData; - try { - jsonData = objectMapper.writeValueAsString(data); - } catch (final JsonProcessingException e) { - log.error("JSON exception occurred when processing pass through request data for the given cmHandle {}", - cmHandle); - throw new DmiException("Unable to process incoming JSON from the request body.", - "JSON exception occurred when writing data for the given cmHandle " + cmHandle, e); - } + final String dataType, final String data) { final ResponseEntity<String> responseEntity = - sdncOperations.writeResourceDataPassthroughRunning(cmHandle, resourceIdentifier, dataType, jsonData); + sdncOperations.writeResourceDataPassthroughRunning(cmHandle, resourceIdentifier, dataType, data); if (responseEntity.getStatusCode() == HttpStatus.CREATED) { return responseEntity.getBody(); } else { |