Java api for playsms generic smsc

Created a java api for sending sms with a servlet that gets parameters from this link: http://example.api.url/handler.php?user={GENERIC_API_USERNAME}&pwd={GENERIC_API_PASSWORD}&sender={GENERIC_SENDER}&msisdn={GENERIC_TO}&message={GENERIC_MESSAGE}
It works perfectly but my credit doesn’t reduce. I have managed the sms rate and also routed the outgoing sms.
While sending I get the message in my phone but the dialog “Your message has been delivered to queue (queued:1 failed:0)” appears.

Here is my playsms log:

    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsmsd # start processing queue_code:8ac0882d9422886c5ff3d6edd7ccd2d1 chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 12:58:38 uid:1 gpid:0 sender_id:704307
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsmsd # sending queue_code:8ac0882d9422886c5ff3d6edd7ccd2d1 smslog_id:1 to:254728064120 sms_count:1 counter:1
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsms_process # start
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 simplerate__cansend # allowed user uid:1 sms_to:254728064120 credit:10000.000 count:1 rate:1.000 charge:1 balance:9999
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsms # saving smslog_id:1 u:1 g:0 gw:generic smsc:generic s:704307 d:254728064120 type:text unicode:0 status:0
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsms_process # saved smslog_id:1 id:1
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 generic_hook_sendsms # failed smslog_id:1 resp:[] smsc:generic
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsms_process # end
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsmsd # result queue_code:8ac0882d9422886c5ff3d6edd7ccd2d1 to:254728064120 flag:2 smslog_id:1
    • 2016-04-20 12:58:39 PID571752cf9044a - L2 sendsmsd # finish processing queue_code:8ac0882d9422886c5ff3d6edd7ccd2d1 uid:1 sender_id:704307 queue_count:1 sms_count:1
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsmsd # start processing queue_code:0271495b82de941fcc7e0cbde771c414 chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 13:12:34 uid:1 gpid:0 sender_id:704307
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsmsd # sending queue_code:0271495b82de941fcc7e0cbde771c414 smslog_id:2 to:254728064120 sms_count:1 counter:1
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsms_process # start
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 simplerate__cansend # allowed user uid:1 sms_to:254728064120 credit:10000.000 count:1 rate:1.000 charge:1 balance:9999
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsms # saving smslog_id:2 u:1 g:0 gw:generic smsc:generic s:704307 d:254728064120 type:text unicode:0 status:0
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsms_process # saved smslog_id:2 id:2
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 generic_hook_sendsms # failed smslog_id:2 resp:[] smsc:generic
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsms_process # end
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsmsd # result queue_code:0271495b82de941fcc7e0cbde771c414 to:254728064120 flag:2 smslog_id:2
    • 2016-04-20 13:12:34 PID57175612801d0 - L2 sendsmsd # finish processing queue_code:0271495b82de941fcc7e0cbde771c414 uid:1 sender_id:704307 queue_count:1 sms_count:1
    • 2016-04-20 13:14:44 PID57175694afd7f - L2 sendsmsd # start processing queue_code:f79c8335665f7fe439403d942042b1b9 chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 13:14:44 uid:1 gpid:0 sender_id:704307
    • 2016-04-20 13:14:44 PID57175694afd7f - L2 sendsmsd # sending queue_code:f79c8335665f7fe439403d942042b1b9 smslog_id:3 to:254728064120 sms_count:1 counter:1
    • 2016-04-20 13:14:44 PID57175694afd7f - L2 sendsms_process # start
    • 2016-04-20 13:14:44 PID57175694afd7f - L2 simplerate__cansend # allowed user uid:1 sms_to:254728064120 credit:10000.000 count:1 rate:1.000 charge:1 balance:9999
    • 2016-04-20 13:14:44 PID57175694afd7f - L2 sendsms # saving smslog_id:3 u:1 g:0 gw:generic smsc:generic s:704307 d:254728064120 type:text unicode:0 status:0
    • 2016-04-20 13:14:44 PID57175694afd7f - L2 sendsms_process # saved smslog_id:3 id:3
    • 2016-04-20 13:14:46 PID57175694afd7f - L2 generic_hook_sendsms # failed smslog_id:3 resp:[] smsc:generic
    • 2016-04-20 13:14:46 PID57175694afd7f - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 13:14:46 PID57175694afd7f - L2 sendsms_process # end
    • 2016-04-20 13:14:46 PID57175694afd7f - L2 sendsmsd # result queue_code:f79c8335665f7fe439403d942042b1b9 to:254728064120 flag:2 smslog_id:3
    • 2016-04-20 13:14:46 PID57175694afd7f - L2 sendsmsd # finish processing queue_code:f79c8335665f7fe439403d942042b1b9 uid:1 sender_id:704307 queue_count:1 sms_count:1
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsmsd # start processing queue_code:cf43420da6fb82f22c3b8eb15b9b1403 chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 13:19:37 uid:1 gpid:0 sender_id:704307
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsmsd # sending queue_code:cf43420da6fb82f22c3b8eb15b9b1403 smslog_id:4 to:254728064120 sms_count:1 counter:1
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsms_process # start
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 simplerate__cansend # allowed user uid:1 sms_to:254728064120 credit:10000.000 count:1 rate:1.000 charge:1 balance:9999
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsms # saving smslog_id:4 u:1 g:0 gw:generic smsc:generic s:704307 d:254728064120 type:text unicode:0 status:0
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsms_process # saved smslog_id:4 id:4
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 generic_hook_sendsms # failed smslog_id:4 resp:[] smsc:generic
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsms_process # end
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsmsd # result queue_code:cf43420da6fb82f22c3b8eb15b9b1403 to:254728064120 flag:2 smslog_id:4
    • 2016-04-20 13:19:38 PID571757ba196c0 - L2 sendsmsd # finish processing queue_code:cf43420da6fb82f22c3b8eb15b9b1403 uid:1 sender_id:704307 queue_count:1 sms_count:1
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsmsd # start processing queue_code:673131044e2e193c343e5d6682ab7acd chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 13:23:06 uid:1 gpid:0 sender_id:704307
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsmsd # sending queue_code:673131044e2e193c343e5d6682ab7acd smslog_id:5 to:254728064120 sms_count:1 counter:1
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsms_process # start
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 simplerate__cansend # allowed user uid:1 sms_to:254728064120 credit:10000.000 count:1 rate:1.000 charge:1 balance:9999
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsms # saving smslog_id:5 u:1 g:0 gw:generic smsc:generic s:704307 d:254728064120 type:text unicode:0 status:0
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsms_process # saved smslog_id:5 id:5
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 generic_hook_sendsms # failed smslog_id:5 resp:[] smsc:generic
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsms_process # end
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsmsd # result queue_code:673131044e2e193c343e5d6682ab7acd to:254728064120 flag:2 smslog_id:5
    • 2016-04-20 13:23:07 PID5717588b5d1ab - L2 sendsmsd # finish processing queue_code:673131044e2e193c343e5d6682ab7acd uid:1 sender_id:704307 queue_count:1 sms_count:1
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsmsd # start processing queue_code:82e84d2c8e1b9b82f9f2696cf41f0ac7 chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 13:54:04 uid:2 gpid:0 sender_id:704307
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsmsd # sending queue_code:82e84d2c8e1b9b82f9f2696cf41f0ac7 smslog_id:6 to:254728064120 sms_count:1 counter:1
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsms_process # start
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 simplerate__cansend # allowed user uid:2 sms_to:254728064120 credit:20000000.000 count:1 rate:1.000 charge:1 balance:19999999
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsms # saving smslog_id:6 u:2 g:0 gw:generic smsc:generic s:704307 d:254728064120 type:text unicode:0 status:0
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsms_process # saved smslog_id:6 id:6
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 generic_hook_sendsms # failed smslog_id:6 resp:[] smsc:generic
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsms_process # end
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsmsd # result queue_code:82e84d2c8e1b9b82f9f2696cf41f0ac7 to:254728064120 flag:2 smslog_id:6
    • 2016-04-20 13:54:04 PID57175fcc86784 - L2 sendsmsd # finish processing queue_code:82e84d2c8e1b9b82f9f2696cf41f0ac7 uid:2 sender_id:704307 queue_count:1 sms_count:1
    • 2016-04-20 13:57:45 PID571760a9d7f21 - L2 sendsmsd # start processing queue_code:5219c56b966da0d9f01d45191deee114 chunk:0 queue_count:2 sms_count:4 scheduled:2016-04-20 13:57:45 uid:1 gpid:0 sender_id:704307
    • 2016-04-20 13:57:45 PID571760a9d7f21 - L2 sendsmsd # sending queue_code:5219c56b966da0d9f01d45191deee114 smslog_id:7 to:254705836437 sms_count:4 counter:1
    • 2016-04-20 13:57:45 PID571760a9d7f21 - L2 sendsms_process # start
    • 2016-04-20 13:57:45 PID571760a9d7f21 - L2 simplerate__cansend # allowed user uid:1 sms_to:254705836437 credit:10000.000 count:2 rate:1.000 charge:2 balance:9998
    • 2016-04-20 13:57:45 PID571760a9d7f21 - L2 sendsms # saving smslog_id:7 u:1 g:0 gw:generic smsc:generic s:704307 d:254705836437 type:text unicode:0 status:0
    • 2016-04-20 13:57:45 PID571760a9d7f21 - L2 sendsms_process # saved smslog_id:7 id:7
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 generic_hook_sendsms # failed smslog_id:7 resp:[] smsc:generic
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsms_process # end
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsmsd # result queue_code:5219c56b966da0d9f01d45191deee114 to:254705836437 flag:2 smslog_id:7
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsmsd # sending queue_code:5219c56b966da0d9f01d45191deee114 smslog_id:8 to:254728064120 sms_count:4 counter:2
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsms_process # start
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 simplerate__cansend # allowed user uid:1 sms_to:254728064120 credit:10000.000 count:2 rate:1.000 charge:2 balance:9998
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsms # saving smslog_id:8 u:1 g:0 gw:generic smsc:generic s:704307 d:254728064120 type:text unicode:0 status:0
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsms_process # saved smslog_id:8 id:8
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 generic_hook_sendsms # failed smslog_id:8 resp:[] smsc:generic
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsms_process # end
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsmsd # result queue_code:5219c56b966da0d9f01d45191deee114 to:254728064120 flag:2 smslog_id:8
    • 2016-04-20 13:57:46 PID571760a9d7f21 - L2 sendsmsd # finish processing queue_code:5219c56b966da0d9f01d45191deee114 uid:1 sender_id:704307 queue_count:2 sms_count:4
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsmsd # start processing queue_code:0a1f6a8f15c788fd6e4919ad344451e9 chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 13:58:49 uid:2 gpid:0 sender_id:704307
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsmsd # sending queue_code:0a1f6a8f15c788fd6e4919ad344451e9 smslog_id:9 to:254724111811 sms_count:1 counter:1
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsms_process # start
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 simplerate__cansend # allowed user uid:2 sms_to:254724111811 credit:20000000.000 count:1 rate:1.000 charge:1 balance:19999999
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsms # saving smslog_id:9 u:2 g:0 gw:generic smsc:generic s:704307 d:254724111811 type:text unicode:0 status:0
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsms_process # saved smslog_id:9 id:9
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 generic_hook_sendsms # failed smslog_id:9 resp:[] smsc:generic
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsms_process # end
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsmsd # result queue_code:0a1f6a8f15c788fd6e4919ad344451e9 to:254724111811 flag:2 smslog_id:9
    • 2016-04-20 13:58:50 PID571760ea05015 - L2 sendsmsd # finish processing queue_code:0a1f6a8f15c788fd6e4919ad344451e9 uid:2 sender_id:704307 queue_count:1 sms_count:1
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsmsd # start processing queue_code:86709accabc7b7ccacdf0c43acac22c7 chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 15:23:33 uid:2 gpid:0 sender_id:704307
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsmsd # sending queue_code:86709accabc7b7ccacdf0c43acac22c7 smslog_id:10 to:254723055630 sms_count:1 counter:1
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsms_process # start
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 simplerate__cansend # allowed user uid:2 sms_to:254723055630 credit:20000000.000 count:1 rate:1.000 charge:1 balance:19999999
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsms # saving smslog_id:10 u:2 g:0 gw:generic smsc:generic s:704307 d:254723055630 type:text unicode:0 status:0
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsms_process # saved smslog_id:10 id:10
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 generic_hook_sendsms # failed smslog_id:10 resp:[] smsc:generic
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsms_process # end
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsmsd # result queue_code:86709accabc7b7ccacdf0c43acac22c7 to:254723055630 flag:2 smslog_id:10
    • 2016-04-20 15:23:34 PID571774c678d7a - L2 sendsmsd # finish processing queue_code:86709accabc7b7ccacdf0c43acac22c7 uid:2 sender_id:704307 queue_count:1 sms_count:1
    • 2016-04-20 16:54:23 PID57178a0f76a21 - L2 sendsmsd # start processing queue_code:94c196f6ec2453cbc79cfd21526b9cfe chunk:0 queue_count:1 sms_count:1 scheduled:2016-04-20 16:54:22 uid:1 gpid:0 sender_id:704307
    • 2016-04-20 16:54:23 PID57178a0f76a21 - L2 sendsmsd # sending queue_code:94c196f6ec2453cbc79cfd21526b9cfe smslog_id:11 to:254728064120 sms_count:1 counter:1
    • 2016-04-20 16:54:23 PID57178a0f76a21 - L2 sendsms_process # start
    • 2016-04-20 16:54:23 PID57178a0f76a21 - L2 simplerate__cansend # allowed user uid:1 sms_to:254728064120 credit:10000.000 count:1 rate:1.000 charge:1 balance:9999
    • 2016-04-20 16:54:23 PID57178a0f76a21 - L2 sendsms # saving smslog_id:11 u:1 g:0 gw:generic smsc:generic s:704307 d:254728064120 type:text unicode:0 status:0
    • 2016-04-20 16:54:23 PID57178a0f76a21 - L2 sendsms_process # saved smslog_id:11 id:11
    • 2016-04-20 16:54:25 PID57178a0f76a21 - L2 generic_hook_sendsms # failed smslog_id:11 resp:[] smsc:generic
    • 2016-04-20 16:54:25 PID57178a0f76a21 - L2 sendsms_process # fail no hook for sendsms
    • 2016-04-20 16:54:25 PID57178a0f76a21 - L2 sendsms_process # end
    • 2016-04-20 16:54:25 PID57178a0f76a21 - L2 sendsmsd # result queue_code:94c196f6ec2453cbc79cfd21526b9cfe to:254728064120 flag:2 smslog_id:11
    • 2016-04-20 16:54:25 PID57178a0f76a21 - L2 sendsmsd # finish processing queue_code:94c196f6ec2453cbc79cfd21526b9cfe uid:1 sender_id:704307 queue_count:1 sms_count:1

Someone kindly help,
Regards,
Julius

sorted it out from this link:[solved] Change the status sms,
Now my credit is reducing.

via:
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);

    request.setAttribute("display data", "Am from the servlet");
    getServletConfig().getServletContext().getRequestDispatcher(
    "/index.jsp").forward(request, response);
}

…index.jsp…

Get Data From Servlet

<% out.print(request.getAttribute("display data").toString()); %>