{"id":450,"date":"2021-08-18T15:13:34","date_gmt":"2021-08-18T06:13:34","guid":{"rendered":"https:\/\/mvc.auctionpro.co.kr\/?page_id=450"},"modified":"2021-08-18T15:17:18","modified_gmt":"2021-08-18T06:17:18","slug":"webservice-json-%ec%9c%bc%eb%a1%9c-%eb%a6%ac%ed%84%b4-%ed%95%98%ea%b8%b0","status":"publish","type":"page","link":"https:\/\/mvc.auctionpro.co.kr\/?page_id=450","title":{"rendered":"WebService Json \uc73c\ub85c \ub9ac\ud134 \ud558\uae30"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Remark : \ub9ce\uc774 \uc4f0\uace0 \uc788\ub294 Json\uc73c\ub85c \ub9ac\ud134 \ud574\ubcf4\uc790<\/h3>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1  WebService.asmx  \uae30\ubcf8 \uc18c\uc2a4\ub294 \ub2e4\uc74c\uacfc \uac19\uace0 xml \ud615\uc2dd\uc73c\ub85c \ub9ac\ud134\ud55c\ub2e4.<\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \" title=\"WcfService1\">using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Services;\n\nnamespace WcfService1\n{\n    \/\/\/ &lt;summary&gt;\n    \/\/\/ WebService\uc758 \uc694\uc57d \uc124\uba85\uc785\ub2c8\ub2e4.\n    \/\/\/ &lt;\/summary&gt;\n    [WebService(Namespace = \"http:\/\/tempuri.org\/\")]\n    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]\n    [System.ComponentModel.ToolboxItem(false)]\n    \/\/ ASP.NET AJAX\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c \uc774 \uc6f9 \uc11c\ube44\uc2a4\ub97c \ud638\ucd9c\ud558\ub824\uba74 \ub2e4\uc74c \uc904\uc758 \uc8fc\uc11d \ucc98\ub9ac\ub97c \uc81c\uac70\ud569\ub2c8\ub2e4. \n    \/\/ [System.Web.Script.Services.ScriptService]\n    public class WebService : System.Web.Services.WebService\n    {\n\n        [WebMethod]\n        public string HelloWorld()\n        {\n            return \"Hello World\";\n        }\n    }\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. \ub2e4\uc74c Json \ub370\uc774\ud0c0\ub97c \ub9ac\ud134 \ud574\ubcf4\uc790 <\/h3>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:xhtml decode:true \">{\n\t\"glossary\": {\n\t\t\"title\": \"example glossary\",\n\t\t\"GlossDiv\": {\n\t\t\t\"title\": \"S\",\n\t\t\t\"GlossList\": {\n\t\t\t\t\"GlossEntry\": {\n\t\t\t\t\t\"ID\": \"SGML\",\n\t\t\t\t\t\"SortAs\": \"SGML\",\n\t\t\t\t\t\"GlossTerm\": \"Standard Generalized Markup Language\",\n\t\t\t\t\t\"Acronym\": \"SGML\",\n\t\t\t\t\t\"Abbrev\": \"ISO 8879:1986\",\n\t\t\t\t\t\"GlossDef\": {\n\t\t\t\t\t\t\"para\": \"A meta-markup language, used to create markup languages such as DocBook.\",\n\t\t\t\t\t\t\"GlossSeeAlso\": [ \"GML\", \"XML\" ]\n\t\t\t\t\t},\n\t\t\t\t\t\"GlossSee\": \"markup\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3.  WebService.asmx  \ucf54\ub4dc\uc5d0 Void \ub85c \ub9ac\ud134\ud558\uac8c \uc124\uc815\ud55c\ub2e4.<\/h3>\n\n\n\n<p>Json \uc758 \ub354\ube14\ucffc\ud14c\uc774\uc158\uc740 \uc2f1\uae00\ucffc\ud14c\uc774\uc158\uc73c\ub85c \ubcc0\uacac\ud558\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:c# decode:true \">using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Services;\n\nnamespace HostRuleService\n{\n    \/\/\/ &lt;summary&gt;\n    \/\/\/ WebService1\uc758 \uc694\uc57d \uc124\uba85\uc785\ub2c8\ub2e4.\n    \/\/\/ &lt;\/summary&gt;\n    [WebService(Namespace = \"http:\/\/tempuri.org\/\")]\n    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]\n    [System.ComponentModel.ToolboxItem(false)]\n    \/\/ ASP.NET AJAX\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c \uc774 \uc6f9 \uc11c\ube44\uc2a4\ub97c \ud638\ucd9c\ud558\ub824\uba74 \ub2e4\uc74c \uc904\uc758 \uc8fc\uc11d \ucc98\ub9ac\ub97c \uc81c\uac70\ud569\ub2c8\ub2e4. \n    \/\/[System.Web.Script.Services.ScriptService]\n    public class WebService1 : System.Web.Services.WebService\n    {\n        [WebMethod]\n        public void HelloWorld()\n        {\n            string str_return = @\"{ 'glossary': { 'title': 'example glossary', 'GlossDiv': { 'title': 'S', 'GlossList': { 'GlossEntry': { 'ID': 'SGML', 'SortAs': 'SGML', 'GlossTerm': 'Standard Generalized Markup Language', 'Acronym': 'SGML', 'Abbrev': 'ISO 8879:1986', 'GlossDef': { 'para': 'A meta-markup language, used to create markup languages such as DocBook.', 'GlossSeeAlso': ['GML', 'XML'] }, 'GlossSee': 'markup' } } } } }\";\n    \n            Context.Response.Clear();\n            Context.Response.ContentType = \"application\/json\";\n\n            Context.Response.Write(str_return);\n\n        }\n    }\n}\n<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. WebSerice \uc640 \uac19\uc740 \ud3fc\uc774 \uc81c\uacf5 \ub41c\ub2e4.<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"637\" src=\"https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/08\/WCF_05-1.jpg\" alt=\"\" class=\"wp-image-451\" srcset=\"https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/08\/WCF_05-1.jpg 834w, https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/08\/WCF_05-1-300x229.jpg 300w, https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/08\/WCF_05-1-768x587.jpg 768w\" sizes=\"auto, (max-width: 834px) 100vw, 834px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">4. \ub9ac\ud134 \uac12\uc740 Json \uc73c\ub85c \ub098\uc628\ub2e4. <br><\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"821\" height=\"257\" src=\"https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/08\/Wcf_Json_00.jpg\" alt=\"\" class=\"wp-image-453\" srcset=\"https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/08\/Wcf_Json_00.jpg 821w, https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/08\/Wcf_Json_00-300x94.jpg 300w, https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2021\/08\/Wcf_Json_00-768x240.jpg 768w\" sizes=\"auto, (max-width: 821px) 100vw, 821px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Json \uc774 xml \ud615\uc2dd \ucc98\ub7fc \uae54\ub054 \ud558\uac8c \ub098\uc624\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n\n\n\n<p>\ub2e4\uc74c\ud398\uc774\uc9c0 \uc5d0\uc11c  \uc815\ud615\ud654\ub41c \ud615\uc2dd\uc73c\ub85c \ub098\uc624\uac8c  \ud574 \ubcf4\uaca0\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remark : \ub9ce\uc774 \uc4f0\uace0 \uc788\ub294 Json\uc73c\ub85c \ub9ac\ud134 \ud574\ubcf4\uc790 1 WebService.asmx \uae30\ubcf8 \uc18c\uc2a4\ub294 \ub2e4\uc74c\uacfc \uac19\uace0 xml \ud615\uc2dd\uc73c\ub85c \ub9ac\ud134\ud55c\ub2e4. 2. \ub2e4\uc74c Json \ub370\uc774\ud0c0\ub97c \ub9ac\ud134 \ud574\ubcf4\uc790 3. WebService.asmx \ucf54\ub4dc\uc5d0 Void \ub85c \ub9ac\ud134\ud558\uac8c \uc124\uc815\ud55c\ub2e4. Json \uc758 \ub354\ube14\ucffc\ud14c\uc774\uc158\uc740 \uc2f1\uae00\ucffc\ud14c\uc774\uc158\uc73c\ub85c \ubcc0\uacac\ud558\ub2e4. 3. WebSerice \uc640 \uac19\uc740 \ud3fc\uc774 \uc81c\uacf5 \ub41c\ub2e4. 4. \ub9ac\ud134 \uac12\uc740 Json \uc73c\ub85c \ub098\uc628\ub2e4. Json \uc774 xml \ud615\uc2dd \ucc98\ub7fc \uae54\ub054 \ud558\uac8c\u2026 <span class=\"read-more\"><a href=\"https:\/\/mvc.auctionpro.co.kr\/?page_id=450\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-450","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=450"}],"version-history":[{"count":4,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/450\/revisions"}],"predecessor-version":[{"id":459,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/450\/revisions\/459"}],"wp:attachment":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}