From dd5a73df6fc04b3524f154a4add6a34db4257707 Mon Sep 17 00:00:00 2001 From: Dumidu Karunarathna Date: Wed, 5 Dec 2018 14:49:51 +0530 Subject: [PATCH] fix for HUBDEV-2334 return success the response for request with null value for callbackData --- .../mediator/impl/ussd/NorthBoundUSSDSubscriptionHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mediation-old/src/main/java/com/wso2telco/dep/mediator/impl/ussd/NorthBoundUSSDSubscriptionHandler.java b/mediation-old/src/main/java/com/wso2telco/dep/mediator/impl/ussd/NorthBoundUSSDSubscriptionHandler.java index 242f055..09806f8 100644 --- a/mediation-old/src/main/java/com/wso2telco/dep/mediator/impl/ussd/NorthBoundUSSDSubscriptionHandler.java +++ b/mediation-old/src/main/java/com/wso2telco/dep/mediator/impl/ussd/NorthBoundUSSDSubscriptionHandler.java @@ -124,7 +124,8 @@ public boolean handle(MessageContext context) throws Exception { // request creation subscriptionGatewayRequestDTO.setClientCorrelator(jsonBody.getJSONObject("subscription").getString("clientCorrelator")); - if (jsonBody.getJSONObject("subscription").getJSONObject("callbackReference").has("callbackData")) { + if (jsonBody.getJSONObject("subscription").getJSONObject("callbackReference").has("callbackData") + && !jsonBody.getJSONObject("subscription").getJSONObject("callbackReference").isNull("callbackData")) { callbackReference.setCallbackData(jsonBody.getJSONObject("subscription").getJSONObject("callbackReference").getString("callbackData")); }