summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep Shah <sandeeplinux1068@gmail.com>2020-05-22 23:06:07 -0500
committerSandeep Shah <sandeeplinux1068@gmail.com>2020-05-22 23:06:07 -0500
commitb1f7ad239ed681f473970538d17849281692578c (patch)
treedfa1efd2b0ecb05f8e0c3116ecf32053846e8970
parentb39dc2b5bc842824b6bc2b85bc4f92eedb6d454b (diff)
Bug fix in DMAAP message parsing for CMNotify
Minor bug fix in the DMAAP message for CMNotify Issue-ID: CCSDK-2383 Signed-off-by: SandeepLinux <Sandeep.Shah@ibm.com> Change-Id: Ia080adafecf6d6b3a12682aaab3f244a33a16de5
-rw-r--r--dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java
index e49e77ea..fa14fbb2 100644
--- a/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java
+++ b/dmaap-listener/src/main/java/org/onap/ccsdk/sli/northbound/dmaapclient/CMNotifyDmaapConsumer.java
@@ -71,14 +71,10 @@ public class CMNotifyDmaapConsumer extends SdncDmaapConsumerImpl {
return;
}
- JSONObject rpcMsgBodyNode = new JSONObject();
-
- rpcMsgBodyNode.put(INPUT,payloadNode);
-
String rpcMsgbody;
try {
ObjectMapper mapper = new ObjectMapper();
- rpcMsgbody = mapper.writeValueAsString(rpcMsgBodyNode);
+ rpcMsgbody = "{\"input\":" + mapper.writeValueAsString(payloadNode) + "}";
} catch (Exception e) {
LOG.error("Unable to parse payload in CMNotify-DMAAP message", e);