diff --git a/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage3_r1_tab1.jsp b/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage3_r1_tab1.jsp index b342746b..9168f0ce 100644 --- a/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage3_r1_tab1.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage3_r1_tab1.jsp @@ -235,7 +235,7 @@ {

"resultCode":"0"

-

, "data":[

+

, "data":{

"msgGroupId":"MSGGID_0000000000000"

, "msgType":"SMS"

@@ -245,7 +245,7 @@

, "successCnt":"3"

, "test_yn":null

-

]

+

}

} diff --git a/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage3_r1_tab5.jsp b/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage3_r1_tab5.jsp index ff0d6c8c..e8a9728e 100644 --- a/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage3_r1_tab5.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage3_r1_tab5.jsp @@ -206,18 +206,17 @@ {

 "resultCode":"0"

-

 , "data":[

-

  {

-

   "longPrice":"50"

-

   , "longSendPsbltEa": "19651"

-

   , "mberMoney": "982586.7"

-

   , "message": null

-

   , "picturePrice": "90"

-

   , "pictureSendPsbltEa": "10917"

-

   , "shortPrice": "18"

-

   , "shortSendPsbltEa": "54588"

-

  }

-

 ]

+

 , "data":{

+

  "longPrice":"50"

+

  , "longSendPsbltEa": "19651"

+

  , "mberMoney": "982586.7"

+

  , "message": null

+

  , "picturePrice": "90"

+

  , "pictureSendPsbltEa": "10917"

+

  , "shortPrice": "18"

+

  , "shortSendPsbltEa": "54588"

+

  

+

 }

} diff --git a/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage4_r1.jsp b/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage4_r1.jsp index d26205a7..e8b1c066 100644 --- a/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage4_r1.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/user/sendRESTAPI_infoPage4_r1.jsp @@ -5,6 +5,11 @@ @@ -36,56 +41,53 @@ $(document).ready(function(){ 아래의 예제를 참고하시면 보다 쉽게 문자온 RESTful API의 구현이 가능합니다.
-

Example

- - +

Example

+ + - -
- -
-
+ +
+ +
+
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 65c4db4c..c38d936b 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -151,5 +151,5 @@ /common/error.jsp - + diff --git a/src/main/webapp/sample_mjon/jsp_example_hstry_detail_form_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_hstry_detail_form_r1.jsp index 9fc1d99b..580b2660 100644 --- a/src/main/webapp/sample_mjon/jsp_example_hstry_detail_form_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_hstry_detail_form_r1.jsp @@ -35,8 +35,16 @@ success: function (returnData, status) { console.log('returnData : ', returnData); - if (returnData.resultCode=="0"){ - makeResult(returnData); + if (returnData.data.resultCode=="0"){ + //makeResult(returnData); + + if(returnData.data.objectList.length == 0){ + alert('조회 결과가 없습니다.') + + }else{ + makeResult(returnData); + } + /* $("span#sp").text(returnData.shortPrice); $("span#lp").text(returnData.longPrice); @@ -47,7 +55,7 @@ $("span#pspe").text(returnData.pictureSendPsbltEa); */ } else{ - alert(returnData.resultCode+" : "+returnData.data); + alert(returnData.data.resultCode+" : "+returnData.data.msg); } }, diff --git a/src/main/webapp/sample_mjon/jsp_example_hstry_detail_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_hstry_detail_r1.jsp index ef935236..eb2e256d 100644 --- a/src/main/webapp/sample_mjon/jsp_example_hstry_detail_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_hstry_detail_r1.jsp @@ -32,9 +32,8 @@ //String apiKey = request.getParameter("p_apiKey"); //발급받은 api key - /******************** 전송요청 URL ********************/ - //final String apiUrl = "https://api.munjaon.co.kr/api/inqry/hstryDetail"; - final String apiUrl = "https://api.munjaon.co.kr/api/inqry/hstryDetail"; // 전송요청 URL + /******************** 전송요청 URL ********************/ + final String apiUrl = "https://api.munjaon.co.kr/api/inqry/hstryDetail"; // 전송요청 URL // String apiUrl = "https://apidev.munjaon.co.kr:9998/api/inqry/hstryDetail"; /**************** 발송가능건수 예제 ******************/ diff --git a/src/main/webapp/sample_mjon/jsp_example_hstry_form_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_hstry_form_r1.jsp index 70b3ac6b..11879047 100644 --- a/src/main/webapp/sample_mjon/jsp_example_hstry_form_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_hstry_form_r1.jsp @@ -35,7 +35,7 @@ success: function (returnData, status) { console.log('returnData : ', returnData); - if (returnData.resultCode=="0"){ + if (returnData.data.resultCode=="0"){ console.log('returnData.resultCode : ', typeof returnData.resultCode); if(returnData.data.objectList.length == 0){ @@ -54,7 +54,7 @@ $("span#pspe").text(returnData.pictureSendPsbltEa); */ } else{ - alert(returnData.resultCode+" : "+returnData.data); + alert(returnData.data.resultCode+" : "+returnData.data.msg); } }, diff --git a/src/main/webapp/sample_mjon/jsp_example_hstry_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_hstry_r1.jsp index 31b2a26e..1f149f1f 100644 --- a/src/main/webapp/sample_mjon/jsp_example_hstry_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_hstry_r1.jsp @@ -33,10 +33,8 @@ /******************** 전송요청 URL ********************/ - //final String apiUrl = "https://api.munjaon.co.kr/api/inqry/hstry"; -// final String apiUrl = "http://localhost:8088/api/inqry/hstry"; + final String apiUrl = "https://api.munjaon.co.kr/api/inqry/hstry"; - String apiUrl = "https://api.munjaon.co.kr/api/inqry/hstry"; // 전송요청 URL /**************** 발송가능건수 예제 ******************/ System.out.println("전체발송이력"); diff --git a/src/main/webapp/sample_mjon/jsp_example_select_price_form_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_select_price_form_r1.jsp index cc4c33e2..a2602565 100644 --- a/src/main/webapp/sample_mjon/jsp_example_select_price_form_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_select_price_form_r1.jsp @@ -34,12 +34,13 @@ data : searchWebParam, success: function (returnData, status) { + console.log('returnData : ', returnData) //alert(returnData.shortPrice); //alert(returnData.resultCode); //alert(returnData.message); //alert(returnData.longPrice); - if (returnData.resultCode=="0"){ + if (returnData.data.resultCode=="0"){ $("span#sp").text(returnData.data.shortPrice); $("span#lp").text(returnData.data.longPrice); $("span#pp").text(returnData.data.picturePrice); @@ -48,7 +49,7 @@ $("span#lspe").text(returnData.data.longSendPsbltEa); $("span#pspe").text(returnData.data.pictureSendPsbltEa); } else{ - alert(returnData.resultCode+" : "+returnData.data); + alert(returnData.data.resultCode+" : "+returnData.data.msg); } }, diff --git a/src/main/webapp/sample_mjon/jsp_example_select_price_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_select_price_r1.jsp index 2621532e..ade30f6e 100644 --- a/src/main/webapp/sample_mjon/jsp_example_select_price_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_select_price_r1.jsp @@ -24,20 +24,17 @@ //회원아이디, APIKEY - 보안을 위해 실제 서비스 시에는 이곳에 mberId와 apiKey 값을 적어서 사용해주세요 //실제서비스용 - //final String mberId = "goodgkdus"; //문자온 로그인 아이디 - //final String apiKey = "12e749877379aa7426275414050694b953"; //발급받은 api key + final String mberId = "antelope"; //문자온 로그인 아이디 + final String apiKey = "5ec0a0311a7a0eb25cc9c11468ce372cd64501"; //발급받은 api key + //테스트용 //String mberId = request.getParameter("p_mberId"); //문자온 로그인 아이디 //String apiKey = request.getParameter("p_apiKey"); //발급받은 api key - /******************** 전송요청 URL ********************/ - final String apiUrl = "https://api.munjaon.co.kr/api/inqry/selectPrice"; -// final String apiUrl = "http://localhost:8088/api/inqry/selectPrice"; - - final String mberId = "antelope"; //문자온 로그인 아이디 - final String apiKey = "5ec0a0311a7a0eb25cc9c11468ce372cd64501"; //발급받은 api key + /******************** 전송요청 URL ********************/ + final String apiUrl = "https://api.munjaon.co.kr/api/inqry/price"; /**************** 발송가능건수 예제 ******************/ System.out.println("잔액|단가|발송가능건수"); diff --git a/src/main/webapp/sample_mjon/jsp_example_send_msg_form_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_send_msg_form_r1.jsp index e49a1619..055f4b3d 100644 --- a/src/main/webapp/sample_mjon/jsp_example_send_msg_form_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_send_msg_form_r1.jsp @@ -37,7 +37,7 @@ success: function (returnData, status) { console.log('returnData :: ', returnData); - if (returnData.resultCode=="0"){ //결과가 성공인 경우 결과값 노출 + if (returnData.data.resultCode=="0"){ //결과가 성공인 경우 결과값 노출 $("span#mgi").text(returnData.data.msgGroupId); $("span#sc").text(returnData.data.successCnt); @@ -46,7 +46,7 @@ $("span#mt").text(returnData.data.msgType); } else{ //결과가 실패인 경우 원인 노출 - alert(returnData.resultCode+" : "+returnData.data); + alert(returnData.data.resultCode+" : "+returnData.data.msg); } }, diff --git a/src/main/webapp/sample_mjon/jsp_example_send_msg_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_send_msg_r1.jsp index 31a82c92..d29e439c 100644 --- a/src/main/webapp/sample_mjon/jsp_example_send_msg_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_send_msg_r1.jsp @@ -21,21 +21,20 @@ //기본 설정값 final String encodingType = "UTF-8"; final String boundary = "____boundary____"; - - /******************** 전송 요청 URL ********************/ - //final String apiUrl = "http://localhost:8088/api/send/sendMsg"; - final String apiUrl = "https://api.munjaon.co.kr/api/send/sendMsg"; //개발테스트용 URL - //final String apiUrl = "https://api.munjaon.co.kr:9998/api/send/sendMsg"; //실제 서비스 URL - + //회원아이디, APIKEY - 보안을 위해 실제 서비스 시에는 이곳에 mberId와 apiKey 값을 적어서 사용 //실제서비스용 final String mberId = "antelope"; //문자온 로그인 아이디 final String apiKey = "5ec0a0311a7a0eb25cc9c11468ce372cd64501"; //발급받은 api key + //테스트용 //String mberId = request.getParameter("p_mberId"); //문자온 로그인 아이디 //String apiKey = request.getParameter("p_apiKey"); //발급받은 api key - + + /******************** 전송 요청 URL ********************/ + final String apiUrl = "https://api.munjaon.co.kr/api/send/sendMsg"; //개발테스트용 URL + /******************** 전송 정보 ********************/ //필수 값 String p_callFrom = request.getParameter("p_callFrom"); //발신자 번호 diff --git a/src/main/webapp/sample_mjon/jsp_example_send_msgs_form_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_send_msgs_form_r1.jsp index 226d876c..f57a7a46 100644 --- a/src/main/webapp/sample_mjon/jsp_example_send_msgs_form_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_send_msgs_form_r1.jsp @@ -43,7 +43,7 @@ console.log('returnData : ', returnData); - if (returnData.resultCode=="0"){ //결과가 성공인 경우 결과값 노출 + if (returnData.data.resultCode=="0"){ //결과가 성공인 경우 결과값 노출 $("span#mgi").text(returnData.data.msgGroupIdList); $("span#sc").text(returnData.data.successCnt); $("span#fc").text(returnData.data.failCnt); @@ -51,7 +51,7 @@ $("span#mt").text(returnData.data.msgTypeList); } else{ //결과가 실패인 경우 원인 노출 - alert(returnData.resultCode+" : "+returnData.data); + alert(returnData.data.resultCode+" : "+returnData.data.msg); } }, diff --git a/src/main/webapp/sample_mjon/jsp_example_send_msgs_r1.jsp b/src/main/webapp/sample_mjon/jsp_example_send_msgs_r1.jsp index 3c94eaf9..9461fb9a 100644 --- a/src/main/webapp/sample_mjon/jsp_example_send_msgs_r1.jsp +++ b/src/main/webapp/sample_mjon/jsp_example_send_msgs_r1.jsp @@ -22,11 +22,6 @@ final String encodingType = "UTF-8"; final String boundary = "____boundary____"; - /******************** 전송 요청 URL ********************/ - //String apiUrl = "http://localhost:8088/api/send/sendMsgs"; - //final String apiUrl = "https://api.munjaon.co.kr:9998/api/send/sendMsg"; //실제 서비스 URL - String apiUrl = "https://api.munjaon.co.kr/api/send/sendMsgs"; //개발테스트용 URL - //회원아이디, APIKEY - 보안을 위해 실제 서비스 시에는 이곳에 mberId와 apiKey 값을 적어서 사용 //실제서비스용 final String mberId = "antelope"; //문자온 로그인 아이디 @@ -35,7 +30,11 @@ //테스트용 //String mberId = request.getParameter("p_mberId"); //문자온 로그인 아이디 //String apiKey = request.getParameter("p_apiKey"); //발급받은 api key - + + + /******************** 전송 요청 URL ********************/ + String apiUrl = "https://api.munjaon.co.kr/api/send/sendMsgs"; //개발테스트용 URL + /******************** 전송 정보 ********************/ //필수 값’ String p_callFrom = request.getParameter("p_callFrom"); //발신자 번호 diff --git a/src/main/webapp/sample_mjon/jsp_샘플_예제.zip b/src/main/webapp/sample_mjon/jsp_샘플_예제.zip new file mode 100644 index 00000000..e73d1c1f Binary files /dev/null and b/src/main/webapp/sample_mjon/jsp_샘플_예제.zip differ diff --git a/src/main/webapp/sendRESTAPI_test_r1_send.jsp b/src/main/webapp/sendRESTAPI_test_r1_send.jsp index 59dcbafe..904c1c18 100644 --- a/src/main/webapp/sendRESTAPI_test_r1_send.jsp +++ b/src/main/webapp/sendRESTAPI_test_r1_send.jsp @@ -187,7 +187,7 @@ case "MYDATA": System.out.println("잔액|단가|발송가능건수"); sms_url = "http://localhost:8088/api/accessKey/myData"; // 전송요청 URL - sms_url = "http://localhost:8088/api/inqry/selectPrice"; // 전송요청 URL + sms_url = "http://localhost:8088/api/inqry/price"; // 전송요청 URL break; default: