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")); }