|
|
|
@ -17,240 +17,323 @@ import com.gcc.flagpoles.util.MessageUtility; |
|
|
|
@Service |
|
|
|
public class SMSService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private AppConfig appConfig; |
|
|
|
@Autowired |
|
|
|
private AppConfig appConfig; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private MessageUtility messageUtility; |
|
|
|
@Autowired |
|
|
|
private MessageUtility messageUtility; |
|
|
|
|
|
|
|
private final String key = "pfTEYN6H"; |
|
|
|
|
|
|
|
public String sendBookingSuccesssms(String mobileNo, String requestId) { |
|
|
|
private final String key = "pfTEYN6H"; |
|
|
|
|
|
|
|
String message = "Your Flag Pole permission request has been submitted successfully. " |
|
|
|
+ "Request ID: " + requestId |
|
|
|
+ ". You will be notified once the status is updated. By GCC"; |
|
|
|
public String sendBookingSuccesssms(String mobileNo, String requestId) { |
|
|
|
|
|
|
|
// Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
.replace("%3A", ":"); |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176959297472163"; |
|
|
|
|
|
|
|
System.out.println("SMS URL:- " + urlString); |
|
|
|
|
|
|
|
String response = messageUtility.sendSMS(urlString); |
|
|
|
System.out.println("SMS RESPONSE:- " + response); |
|
|
|
|
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
public String userrequestApprovedsms(String mobileNo, String requestId) { |
|
|
|
|
|
|
|
String message = "Your Flag Pole permission request has been approved. " |
|
|
|
+ "Request ID: " + requestId |
|
|
|
+ ". Please proceed as per the permitted guidelines. By GCC"; |
|
|
|
|
|
|
|
// Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
.replace("%3A", ":"); |
|
|
|
String message = "Your Flag Pole permission request has been submitted successfully. " |
|
|
|
+ "Request ID: " + requestId |
|
|
|
+ ". You will be notified once the status is updated. By GCC"; |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176959297472163"; |
|
|
|
|
|
|
|
System.out.println("SMS URL:- " + urlString); |
|
|
|
|
|
|
|
String response = messageUtility.sendSMS(urlString); |
|
|
|
System.out.println("SMS RESPONSE:- " + response); |
|
|
|
|
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
public String fineforunauthorizedflagpoleSms(String mobileNo, |
|
|
|
String location, |
|
|
|
String fineAmount, |
|
|
|
String requestId) { |
|
|
|
|
|
|
|
String message = "An unauthorized flag pole installation was found at " + location + ". " |
|
|
|
+ "Fine amount: Rs." + fineAmount |
|
|
|
+ " to be paid at https://gccservices.in/flagpolesregistration/paymentform?requestId=" |
|
|
|
+ requestId |
|
|
|
+ " to avoid further action.\n" |
|
|
|
+ "By GCC"; |
|
|
|
|
|
|
|
// Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
.replace("%3A", ":"); |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176984622316740"; // <-- replace with correct template id |
|
|
|
|
|
|
|
System.out.println("SMS URL:- " + urlString); |
|
|
|
|
|
|
|
String response = messageUtility.sendSMS(urlString); |
|
|
|
System.out.println("SMS RESPONSE:- " + response); |
|
|
|
|
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
public String restorationflagpoleSms(String mobileNo, |
|
|
|
String streetName, |
|
|
|
String amount, |
|
|
|
String requestId) { |
|
|
|
|
|
|
|
try { |
|
|
|
// Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
.replace("%3A", ":"); |
|
|
|
|
|
|
|
String message = "Your flagpole installation at " + streetName |
|
|
|
+ " caused damage to the public property. " |
|
|
|
+ "Restoration charges of RS." + amount |
|
|
|
+ " to be paid at https://gccservices.in/flagpolesregistration/paymentform?requestId=" |
|
|
|
+ requestId |
|
|
|
+ " to avoid further action.\r\n" |
|
|
|
+ "By GCC"; |
|
|
|
|
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8); |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176984612580095"; |
|
|
|
|
|
|
|
System.out.println("FINAL SMS URL:- " + urlString); |
|
|
|
|
|
|
|
URL apiUrl = new URL(urlString); |
|
|
|
HttpURLConnection conn = (HttpURLConnection) apiUrl.openConnection(); |
|
|
|
conn.setRequestMethod("GET"); |
|
|
|
conn.setConnectTimeout(15000); |
|
|
|
conn.setReadTimeout(15000); |
|
|
|
|
|
|
|
BufferedReader in = new BufferedReader( |
|
|
|
new InputStreamReader(conn.getInputStream())); |
|
|
|
String inputLine; |
|
|
|
StringBuilder content = new StringBuilder(); |
|
|
|
|
|
|
|
while ((inputLine = in.readLine()) != null) { |
|
|
|
content.append(inputLine); |
|
|
|
} |
|
|
|
|
|
|
|
in.close(); |
|
|
|
conn.disconnect(); |
|
|
|
|
|
|
|
System.out.println("DIRECT SMS RESPONSE:- " + content.toString()); |
|
|
|
|
|
|
|
return content.toString(); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
return "FAILED"; |
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176959297472163"; |
|
|
|
|
|
|
|
System.out.println("SMS URL:- " + urlString); |
|
|
|
|
|
|
|
String response = messageUtility.sendSMS(urlString); |
|
|
|
System.out.println("SMS RESPONSE:- " + response); |
|
|
|
|
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
public String userrequestApprovedsms(String mobileNo, String requestId) { |
|
|
|
|
|
|
|
String message = "Your Flag Pole permission request has been approved. " |
|
|
|
+ "Request ID: " + requestId |
|
|
|
+ ". Please proceed as per the permitted guidelines. By GCC"; |
|
|
|
|
|
|
|
// Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
.replace("%3A", ":"); |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176959297472163"; |
|
|
|
|
|
|
|
System.out.println("SMS URL:- " + urlString); |
|
|
|
|
|
|
|
String response = messageUtility.sendSMS(urlString); |
|
|
|
System.out.println("SMS RESPONSE:- " + response); |
|
|
|
|
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
public String fineforunauthorizedflagpoleSms(String mobileNo, |
|
|
|
String location, |
|
|
|
String fineAmount, |
|
|
|
String requestId) { |
|
|
|
|
|
|
|
String message = "An unauthorized flag pole installation was found at " + location + ". " |
|
|
|
+ "Fine amount: Rs." + fineAmount |
|
|
|
+ " to be paid at https://gccservices.in/flagpolesregistration/paymentform?requestId=" |
|
|
|
+ requestId |
|
|
|
+ " to avoid further action.\n" |
|
|
|
+ "By GCC"; |
|
|
|
|
|
|
|
// Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
.replace("%3A", ":"); |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176984622316740"; // <-- replace with correct template id |
|
|
|
|
|
|
|
System.out.println("SMS URL:- " + urlString); |
|
|
|
|
|
|
|
String response = messageUtility.sendSMS(urlString); |
|
|
|
System.out.println("SMS RESPONSE:- " + response); |
|
|
|
|
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
public String restorationflagpoleSms(String mobileNo, |
|
|
|
String streetName, |
|
|
|
String amount, |
|
|
|
String requestId) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
String message = "Your flagpole installation at " + streetName |
|
|
|
+ " caused damage to the public property. " |
|
|
|
+ "Restoration charges of RS." + amount |
|
|
|
+ " to be paid at https://gccservices.in/flagpolesregistration/paymentform?requestId=" |
|
|
|
+ requestId |
|
|
|
+ " to avoid further action.\r\n" |
|
|
|
+ "By GCC"; |
|
|
|
|
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8); |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176984612580095"; |
|
|
|
|
|
|
|
System.out.println("FINAL SMS URL:- " + urlString); |
|
|
|
|
|
|
|
URL apiUrl = new URL(urlString); |
|
|
|
HttpURLConnection conn = (HttpURLConnection) apiUrl.openConnection(); |
|
|
|
conn.setRequestMethod("GET"); |
|
|
|
conn.setConnectTimeout(15000); |
|
|
|
conn.setReadTimeout(15000); |
|
|
|
|
|
|
|
BufferedReader in = new BufferedReader( |
|
|
|
new InputStreamReader(conn.getInputStream())); |
|
|
|
String inputLine; |
|
|
|
StringBuilder content = new StringBuilder(); |
|
|
|
|
|
|
|
while ((inputLine = in.readLine()) != null) { |
|
|
|
content.append(inputLine); |
|
|
|
} |
|
|
|
|
|
|
|
in.close(); |
|
|
|
conn.disconnect(); |
|
|
|
|
|
|
|
System.out.println("DIRECT SMS RESPONSE:- " + content.toString()); |
|
|
|
|
|
|
|
return content.toString(); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
return "FAILED"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public String unauthorizedFlagPoleSms(String mobileNo, |
|
|
|
String streetName, |
|
|
|
String fineAmount, |
|
|
|
String requestId) { |
|
|
|
public String unauthorizedFlagPoleSms(String mobileNo, |
|
|
|
String streetName, |
|
|
|
String fineAmount, |
|
|
|
String requestId) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
String message = "An unauthorized flag pole installation was found at " + streetName + ". " |
|
|
|
+ "Fine amount: Rs." + fineAmount |
|
|
|
+ " to be paid at https://gccservices.in/flagpolesregistration/paymentform?requestId=" |
|
|
|
+ requestId |
|
|
|
+ " to avoid further action.\r\n" |
|
|
|
+ "By GCC"; |
|
|
|
|
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8); |
|
|
|
|
|
|
|
try { |
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176984622316740"; |
|
|
|
|
|
|
|
String message = "An unauthorized flag pole installation was found at " + streetName + ". " |
|
|
|
+ "Fine amount: Rs." + fineAmount |
|
|
|
+ " to be paid at https://gccservices.in/flagpolesregistration/paymentform?requestId=" |
|
|
|
+ requestId |
|
|
|
+ " to avoid further action.\r\n" |
|
|
|
+ "By GCC"; |
|
|
|
System.out.println("FINAL SMS URL:- " + urlString); |
|
|
|
|
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8); |
|
|
|
URL apiUrl = new URL(urlString); |
|
|
|
HttpURLConnection conn = (HttpURLConnection) apiUrl.openConnection(); |
|
|
|
conn.setRequestMethod("GET"); |
|
|
|
conn.setConnectTimeout(15000); |
|
|
|
conn.setReadTimeout(15000); |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407176984622316740"; |
|
|
|
BufferedReader in = new BufferedReader( |
|
|
|
new InputStreamReader(conn.getInputStream())); |
|
|
|
String inputLine; |
|
|
|
StringBuilder content = new StringBuilder(); |
|
|
|
|
|
|
|
while ((inputLine = in.readLine()) != null) { |
|
|
|
content.append(inputLine); |
|
|
|
} |
|
|
|
|
|
|
|
in.close(); |
|
|
|
conn.disconnect(); |
|
|
|
|
|
|
|
System.out.println("DIRECT SMS RESPONSE:- " + content.toString()); |
|
|
|
|
|
|
|
return content.toString(); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
return "FAILED"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
System.out.println("FINAL SMS URL:- " + urlString); |
|
|
|
///// for permanent flagpole/statue messages |
|
|
|
|
|
|
|
URL apiUrl = new URL(urlString); |
|
|
|
HttpURLConnection conn = (HttpURLConnection) apiUrl.openConnection(); |
|
|
|
conn.setRequestMethod("GET"); |
|
|
|
conn.setConnectTimeout(15000); |
|
|
|
conn.setReadTimeout(15000); |
|
|
|
public String sendBookingSuccesssmspermanent(String mobileNo, String requestId) { |
|
|
|
|
|
|
|
BufferedReader in = new BufferedReader( |
|
|
|
new InputStreamReader(conn.getInputStream())); |
|
|
|
String inputLine; |
|
|
|
StringBuilder content = new StringBuilder(); |
|
|
|
String message = "Your Permanent Flag Pole / Statue permission request has been submitted successfully. " |
|
|
|
+ "Request ID: " + requestId |
|
|
|
+ ". You will be notified once the status is updated. By GCC"; |
|
|
|
|
|
|
|
while ((inputLine = in.readLine()) != null) { |
|
|
|
content.append(inputLine); |
|
|
|
} |
|
|
|
// Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
.replace("%3A", ":") |
|
|
|
.replace("%2F", "/"); |
|
|
|
|
|
|
|
in.close(); |
|
|
|
conn.disconnect(); |
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407177062205821043"; |
|
|
|
|
|
|
|
System.out.println("DIRECT SMS RESPONSE:- " + content.toString()); |
|
|
|
System.out.println("SMS URL:- " + urlString); |
|
|
|
|
|
|
|
return content.toString(); |
|
|
|
String response = messageUtility.sendSMS(urlString); |
|
|
|
System.out.println("SMS RESPONSE:- " + response); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
return "FAILED"; |
|
|
|
return response; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
///// for permanent flagpole/statue messages |
|
|
|
// public String sendPermanentRequestApproved(String mobileNo, String requestId) |
|
|
|
// { |
|
|
|
|
|
|
|
// String message = "Your Permanent Flag Pole / Statue permission request has |
|
|
|
// been approved. " |
|
|
|
// + "Request ID: " + requestId |
|
|
|
// + ". Please proceed as per the permitted guidelines. By GCC"; |
|
|
|
|
|
|
|
// // Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
// String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
// .replace("%3A", ":") |
|
|
|
// .replace("%2F", "/"); |
|
|
|
|
|
|
|
// String urlString = appConfig.getGetOtpUrl() |
|
|
|
// + "from=GCCCRP" |
|
|
|
// + "&key=" + key |
|
|
|
// + "&sender=GCCCRP" |
|
|
|
// + "&to=" + mobileNo |
|
|
|
// + "&body=" + encodedMsg |
|
|
|
// + "&entityid=1401572690000011081" |
|
|
|
// + "&templateid=1407177062247610982"; |
|
|
|
|
|
|
|
// System.out.println("SMS URL:- " + urlString); |
|
|
|
|
|
|
|
// String response = messageUtility.sendSMS(urlString); |
|
|
|
// System.out.println("SMS RESPONSE:- " + response); |
|
|
|
|
|
|
|
// return response; |
|
|
|
// } |
|
|
|
|
|
|
|
// public String sendPermanentRequestRejected(String mobileNo, |
|
|
|
// String requestId) { |
|
|
|
|
|
|
|
// try { |
|
|
|
|
|
|
|
// String message = "Your Permanent Flag Pole / Statue permission request has |
|
|
|
// been rejected. " |
|
|
|
// + "Request ID: " + requestId |
|
|
|
// + ". Review the details in the portal |
|
|
|
// https://gccservices.in/flagpolesregistration/status\r\n" |
|
|
|
// + "By GCC"; |
|
|
|
|
|
|
|
// String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8); |
|
|
|
|
|
|
|
// String urlString = appConfig.getGetOtpUrl() |
|
|
|
// + "from=GCCCRP" |
|
|
|
// + "&key=" + key |
|
|
|
// + "&sender=GCCCRP" |
|
|
|
// + "&to=" + mobileNo |
|
|
|
// + "&body=" + encodedMsg |
|
|
|
// + "&entityid=1401572690000011081" |
|
|
|
// + "&templateid=1407177062255650311"; |
|
|
|
|
|
|
|
// System.out.println("FINAL SMS URL:- " + urlString); |
|
|
|
|
|
|
|
public String sendBookingSuccesssmspermanent(String mobileNo, String requestId) { |
|
|
|
// URL apiUrl = new URL(urlString); |
|
|
|
// HttpURLConnection conn = (HttpURLConnection) apiUrl.openConnection(); |
|
|
|
// conn.setRequestMethod("GET"); |
|
|
|
// conn.setConnectTimeout(15000); |
|
|
|
// conn.setReadTimeout(15000); |
|
|
|
|
|
|
|
String message = "Your Permanent Flag Pole / Statue permission request has been submitted successfully. " |
|
|
|
+ "Request ID: " + requestId |
|
|
|
+ ". You will be notified once the status is updated. By GCC"; |
|
|
|
// BufferedReader in = new BufferedReader( |
|
|
|
// new InputStreamReader(conn.getInputStream())); |
|
|
|
// String inputLine; |
|
|
|
// StringBuilder content = new StringBuilder(); |
|
|
|
|
|
|
|
// Encode message and fix colon issue (gateway not decoding %3A) |
|
|
|
String encodedMsg = URLEncoder.encode(message, StandardCharsets.UTF_8) |
|
|
|
.replace("%3A", ":") |
|
|
|
.replace("%2F", "/"); |
|
|
|
// while ((inputLine = in.readLine()) != null) { |
|
|
|
// content.append(inputLine); |
|
|
|
// } |
|
|
|
|
|
|
|
String urlString = appConfig.getGetOtpUrl() |
|
|
|
+ "from=GCCCRP" |
|
|
|
+ "&key=" + key |
|
|
|
+ "&sender=GCCCRP" |
|
|
|
+ "&to=" + mobileNo |
|
|
|
+ "&body=" + encodedMsg |
|
|
|
+ "&entityid=1401572690000011081" |
|
|
|
+ "&templateid=1407177062205821043"; |
|
|
|
// in.close(); |
|
|
|
// conn.disconnect(); |
|
|
|
|
|
|
|
System.out.println("SMS URL:- " + urlString); |
|
|
|
// System.out.println("DIRECT SMS RESPONSE:- " + content.toString()); |
|
|
|
|
|
|
|
String response = messageUtility.sendSMS(urlString); |
|
|
|
System.out.println("SMS RESPONSE:- " + response); |
|
|
|
// return content.toString(); |
|
|
|
|
|
|
|
return response; |
|
|
|
} |
|
|
|
// } catch (Exception e) { |
|
|
|
// e.printStackTrace(); |
|
|
|
// return "FAILED"; |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
} |