{"id":27759,"date":"2021-07-22T18:03:04","date_gmt":"2021-07-22T11:03:04","guid":{"rendered":"https:\/\/wiki.tino.org\/staging\/?p=27759"},"modified":"2021-07-23T18:01:57","modified_gmt":"2021-07-23T11:01:57","slug":"web-service-la-gi","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/web-service-la-gi\/","title":{"rendered":"Web Service l\u00e0 g\u00ec? T\u00ecm hi\u1ec3u ki\u1ebfn tr\u00fac c\u1ee7a Web Service"},"content":{"rendered":"\n<p><strong>V\u1ea5n \u0111\u1ec1 khai th\u00e1c d\u1eef li\u1ec7u t\u1eeb website vi\u1ebft b\u1eb1ng ng\u00f4n ng\u1eef n\u00e0y sang website \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng ng\u00f4n ng\u1eef kh\u00e1c lu\u00f4n x\u1ea3y ra tr\u1ee5c tr\u1eb7c v\u00e0 v\u00f4 c\u00f9ng kh\u00f3 kh\u0103n. \u0110\u00e2y \u0111\u01b0\u1ee3c xem l\u00e0 nh\u1eefng tr\u0103n tr\u1edf m\u00e0 ph\u1ea7n l\u1edbn doanh nghi\u1ec7p \u0111\u1ec1u g\u1eb7p ph\u1ea3i. T\u1eeb th\u1ef1c tr\u1ea1ng n\u00e0y, m\u1ed9t t\u00e0i nguy\u00ean th\u1ed1ng nh\u1ea5t hi\u1ec7u qu\u1ea3 \u0111\u1ec3 m\u1ecdi h\u1ec7 th\u1ed1ng c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng t\u1ed1t \u1edf b\u1ea5t k\u1ef3 \u0111i\u1ec1u ki\u1ec7n n\u00e0o \u0111\u00e3 ra \u0111\u1eddi. \u0110\u00f3 ch\u00ednh l\u00e0 Web Service. V\u1eady Web Service l\u00e0 g\u00ec? C\u00f9ng Tino Group kh\u00e1m ph\u00e1 ngay b\u00ean d\u01b0\u1edbi \u0111\u00e2y nh\u00e9!<\/strong> <a id=\"post-27759-_haslrp8scm7x\"><\/a><\/p>\n\n\n\n<h2 id=\"Gi\u1edbi_thi\u1ec7u_v\u1ec1_Web_Service\"><a id=\"post-27759-_48u8drlztepb\"><\/a><strong>Gi\u1edbi thi\u1ec7u v\u1ec1 Web Service<\/strong><\/h2>\n\n\n\n<h3 id=\"Web_Service_l\u00e0_g\u00ec?_\"><a id=\"post-27759-_92b79nrrqzut\"><\/a><strong>Web Service l\u00e0 g\u00ec? <\/strong><\/h3>\n\n\n\n<p>   Web Service \u0111\u01b0\u1ee3c hi\u1ec3u theo ngh\u0129a ti\u1ebfng Vi\u1ec7t l\u00e0 <strong>d\u1ecbch v\u1ee5 Web<\/strong>. \u0110\u00e2y l\u00e0 t\u1eadp h\u1ee3p nh\u1eefng giao th\u1ee9c v\u00e0 ti\u00eau chu\u1ea9n m\u1edf \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 trao \u0111\u1ed5i d\u1eef li\u1ec7u gi\u1eefa c\u00e1c \u1ee9ng d\u1ee5ng ho\u1eb7c c\u00e1c h\u1ec7 th\u1ed1ng v\u1edbi nhau.  <\/p>\n\n\n\n<p>\n  Hi\u1ec3u \u0111\u01a1n gi\u1ea3n, Web Service l\u00e0 s\u1ef1 t\u00edch h\u1ee3p gi\u1eefa hai m\u00e1y t\u00ednh, gi\u00fap hai m\u00e1y t\u00ednh c\u00f3 th\u1ec3 t\u01b0\u01a1ng t\u00e1c hi\u1ec7u qu\u1ea3 v\u1edbi nhau qua m\u1ea1ng. Web Service cho ph\u00e9p m\u1ed9t ch\u01b0\u01a1ng tr\u00ecnh m\u00e1y t\u00ednh c\u00f3 th\u1ec3 n\u00f3i chuy\u1ec7n v\u1edbi trang web thay v\u00ec ng\u01b0\u1eddi d\u00f9ng ph\u1ea3i t\u1ef1 tr\u00ecnh duy\u1ec7t \u0111\u1ec3 truy c\u1eadp \u0111\u1ebfn website \u0111\u00f3. \n<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-245.jpeg\" alt=\"web-service-la-gi\" class=\"wp-image-27761\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-245.jpeg 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-245-300x161.jpeg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<p>\n  Nh\u1eefng \u1ee9ng d\u1ee5ng ph\u1ea7n m\u1ec1m th\u01b0\u1eddng \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng c\u00e1c ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh ho\u1eb7c ch\u1ea1y tr\u00ean c\u00e1c n\u1ec1n t\u1ea3ng kh\u00e1c nhau. B\u00ean c\u1ea1nh \u0111\u00f3, ch\u00fang c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng Web Service \u0111\u1ec3 trao \u0111\u1ed5i d\u1eef li\u1ec7u qua l\u1ea1i kh\u00e1 t\u01b0\u01a1ng \u0111\u1ed3ng nh\u01b0 ho\u1ea1t \u0111\u1ed9ng li\u00ean l\u1ea1c gi\u1eefa c\u00e1c qu\u00e1 tr\u00ecnh tr\u00ean m\u1ed9t m\u00e1y t\u00ednh. \n<\/p>\n\n\n\n<h3 id=\"Ph\u00e2n_lo\u1ea1i_Web_Service\"><a id=\"post-27759-_fe8qi1ctikfq\"><\/a><strong>Ph\u00e2n lo\u1ea1i Web Service<\/strong><\/h3>\n\n\n\n<h4 id=\"SOAP_Web_Service_\"><a id=\"post-27759-_xdmerrd7u6sc\"><\/a><strong>SOAP Web Service <\/strong><\/h4>\n\n\n\n<p>\n  SOAP Web Service l\u00e0 vi\u1ebft t\u1eaft c\u1ee7a <strong>\u201cSimple Object Access Protocol Web Service\u201d<\/strong>, t\u1ea1m d\u1ecbch: <em>D\u1ecbch v\u1ee5 Web giao th\u1ee9c truy c\u1eadp \u0111\u1ed1i t\u01b0\u1ee3ng \u0111\u01a1n gi\u1ea3n.<\/em>  \n<\/p>\n\n\n\n<p>   \u0110\u00e2y \u0111\u01b0\u1ee3c xem l\u00e0 m\u1ed9t trong nh\u1eefng giao th\u1ee9c \u0111\u01b0\u1ee3c x\u00e2y d\u1ef1ng tr\u00ean XML nh\u1eb1m \u0111\u1ecbnh ngh\u0129a v\u1ec1 d\u1eef li\u1ec7u d\u1ea1ng thu\u1ea7n v\u0103n b\u1ea3n th\u00f4ng qua <a href=\"https:\/\/tino.vn\/blog\/chuyen-http-sang-https\/\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP<\/a>. Soap Web Service trong Java \u0111\u01b0\u1ee3c xem l\u00e0 tr\u1ee5 c\u1ed9t v\u1eefng ch\u1eafc \u0111\u1ec3 c\u00e1c \u1ee9ng d\u1ee5ng ph\u00e2n t\u00e1n nh\u01b0 c\u1ea5u tr\u00fac x\u01b0\u01a1ng s\u01b0\u1eddn \u0111\u01b0\u1ee3c c\u1ea5u th\u00e0nh t\u1eeb nhi\u1ec1u ng\u00f4n ng\u1eef v\u00e0 h\u1ec7 \u0111i\u1ec1u h\u00e0nh kh\u00e1c nhau. Web Service th\u01b0\u1eddng s\u1eed d\u1ee5ng SOAP \u0111\u1ec3 truy\u1ec1n t\u1ea3i d\u1eef li\u1ec7u. <\/p>\n\n\n\n<p>\n  V\u00ec d\u1ef1a v\u00e0o XML n\u00ean SOAP Web Service \u0111\u01b0\u1ee3c xem l\u00e0 giao th\u1ee9c kh\u00f4ng ph\u1ee5 thu\u1ed9c platform hay b\u1ea5t k\u1ef3 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh n\u00e0o. Ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 vi\u1ebft SOAP b\u1eb1ng Java, PHP, .NET,&#8230; hay c\u00f3 th\u1ec3 tri\u1ec3n khai tr\u00ean Windows, Linux,&#8230;\n<\/p>\n\n\n\n<h4 id=\"RESTful_Web_Service\"><a id=\"post-27759-_c9wbxyrq57ke\"><\/a><strong>RESTful Web Service<\/strong><\/h4>\n\n\n\n<p>\n  REST l\u00e0 vi\u1ebft t\u1eaft c\u1ee7a <strong>\u201cREpresentational State Transfer\u201d<\/strong>, t\u1ea1m d\u1ecbch: <em>chuy\u1ec3n tr\u1ea1ng th\u00e1i bi\u1ec3u hi\u1ec7n<\/em>. \n<\/p>\n\n\n\n<p>   REST \u0111\u01b0\u1ee3c xem l\u00e0 m\u1ed9t lo\u1ea1i ki\u1ebfn tr\u00fac ph\u1ea7n m\u1ec1m (architectural style) ch\u1ee9 kh\u00f4ng ph\u1ea3i m\u1ed9t <a href=\"https:\/\/tino.vn\/blog\/protocol-la-gi\/\" target=\"_blank\" rel=\"noreferrer noopener\">protocol<\/a>.  <\/p>\n\n\n\n<p>\n  C\u00f2n RESTful Web Service \u0111\u01b0\u1ee3c hi\u1ec3u l\u00e0 nh\u1eefng Web Service \u0111\u01b0\u1ee3c vi\u1ebft d\u1ef1a tr\u00ean c\u00e1c ki\u1ebfn tr\u00fac c\u1ee7a REST.  B\u00ean c\u1ea1nh \u0111\u00f3, REST \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng r\u1ed9ng r\u00e3i \u0111\u1ec3 thay th\u1ebf cho c\u00e1c Web Service d\u1ef1a tr\u00ean SOAP v\u00e0 WSDL.\n<\/p>\n\n\n\n<p>\n  Kh\u00e1 t\u01b0\u01a1ng \u0111\u1ed3ng v\u1edbi SOAP, RESTful Web Service kh\u00f4ng ph\u1ee5 thu\u1ed9c v\u00e0o platform c\u0169ng nh\u01b0 b\u1ea5t k\u1ef3 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh n\u00e0o. Do \u0111\u00f3, REST c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng SOAP Web Service v\u1edbi ch\u1ee9c n\u0103ng l\u00e0 m\u1ed9t implement c\u1ee7a REST. \n<\/p>\n\n\n\n<p>\n  Trong nh\u1eefng n\u0103m g\u1ea7n \u0111\u00e2y, khi nh\u1eafc \u0111\u1ebfn m\u00f4 h\u00ecnh thi\u1ebft k\u1ebf d\u1ecbch v\u1ee5, REST \u0111\u01b0\u1ee3c \u0111\u00e1nh gi\u00e1 cao v\u00e0 g\u1ea7n nh\u01b0 \u0111\u01b0\u1ee3c xem c\u00f3 th\u1ec3 thay th\u1ebf c\u1ea3 SOAP v\u00e0 WSDL. REST \u0111\u1ecbnh ngh\u0129a v\u1ec1 c\u00e1c quy t\u1eafc ki\u1ebfn tr\u00fac gi\u00fap ng\u01b0\u1eddi d\u00f9ng thi\u1ebft k\u1ebf Web <strong>Server<\/strong>. N\u00f3 ch\u00fa tr\u1ecdng v\u00e0o h\u1ec7 th\u1ed1ng t\u00e0i nguy\u00ean v\u00e0 \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng nhi\u1ec1u ng\u00f4n ng\u1eef kh\u00e1c nhau. \n<\/p>\n\n\n\n<p><strong>Nh\u1eefng nguy\u00ean t\u1eafc c\u01a1 b\u1ea3n c\u1ee7a REST trong thi\u1ebft k\u1ebf:<\/strong>\n<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Hi\u1ec3n th\u1ecb c\u1ea5u tr\u00fac th\u01b0 m\u1ee5c nh\u01b0 c\u00e1c URLs.   <\/li><li>REST s\u1eed d\u1ee5ng ph\u01b0\u01a1ng th\u1ee9c HTTP r\u1ea5t r\u00f5 r\u00e0ng.    <\/li><li>Phi tr\u1ea1ng th\u00e1i.   <\/li><li>REST truy\u1ec1n t\u1ea3i JavaScript Object Notation, XML ho\u1eb7c bao g\u1ed3m c\u1ea3 hai.    <\/li><\/ul>\n\n\n\n<h3 id=\"Nh\u1eefng_th\u00e0nh_ph\u1ea7n_c\u01a1_b\u1ea3n_c\u1ee7a_Web_Service\"><a id=\"post-27759-_16dbqtdshhi6\"><\/a><strong>Nh\u1eefng th\u00e0nh ph\u1ea7n c\u01a1 b\u1ea3n c\u1ee7a Web Service<\/strong><\/h3>\n\n\n\n<h4 id=\"UDDI_\"><a id=\"post-27759-_3gm3lu3xih8w\"><\/a><strong>UDDI <\/strong><\/h4>\n\n\n\n<p>\n  UDDI l\u00e0 vi\u1ebft t\u1eaft c\u1ee7a <strong>\u201cUniversal Description, Discovery, Integration\u201d<\/strong>, t\u1ea1m d\u1ecbch: <em>M\u00f4 t\u1ea3, kh\u00e1m ph\u00e1, t\u00edch h\u1ee3p to\u00e0n c\u1ea7u<\/em>. \n<\/p>\n\n\n\n<p>\n  Th\u00e0nh ph\u1ea7n UDDI l\u00e0 m\u1ed9t ti\u00eau chu\u1ea9n d\u1ef1a tr\u00ean XML nh\u1eb1m m\u00f4 t\u1ea3, xu\u1ea5t b\u1ea3n v\u00e0 t\u00ecm ki\u1ebfm c\u00e1c d\u1ecbch v\u1ee5 c\u1ee7a web. \n<\/p>\n\n\n\n<h4 id=\"WSDL_\"><a id=\"post-27759-_8zu0tc7okghk\"><\/a><strong>WSDL <\/strong><\/h4>\n\n\n\n<p>\n  WSDL l\u00e0 vi\u1ebft t\u1eaft c\u1ee7a <strong>\u201cWeb Service Description Language\u201d<\/strong>, t\u1ea1m d\u1ecbch: <em>Ng\u00f4n ng\u1eef m\u00f4 t\u1ea3 Web Service<\/em>. \n<\/p>\n\n\n\n<p>\n  Th\u00e0nh ph\u1ea7n WSDL \u0111\u01b0\u1ee3c xem l\u00e0 ng\u00f4n ng\u1eef x\u00e2y d\u1ef1ng tr\u00ean XML nh\u1eb1m m\u00f4 t\u1ea3 c\u00e1c d\u1ecbch v\u1ee5 v\u1ec1 web v\u00e0 c\u00e1ch th\u1ee9c \u0111\u1ec3 truy c\u1eadp ch\u00fang. Ngo\u00e0i ra, WSDL c\u00f2n m\u00f4 t\u1ea3 m\u1ed9t d\u1ecbch v\u1ee5 web c\u00f9ng v\u1edbi \u0111\u1ecbnh d\u1ea1ng th\u00f4ng b\u00e1o v\u00e0 nh\u1eefng chi ti\u1ebft giao th\u1ee9c cho d\u1ecbch v\u1ee5 c\u1ee7a web. \n<\/p>\n\n\n\n<h4 id=\"SOAP_\"><a id=\"post-27759-_rpsggyqinwby\"><\/a><strong>SOAP <\/strong><\/h4>\n\n\n\n<p>\n  SOAP l\u00e0 vi\u1ebft t\u1eaft c\u1ee7a <strong>\u201cSimple Object Access Protocol\u201d<\/strong>, t\u1ea1m d\u1ecbch: <em>Giao th\u1ee9c truy c\u1eadp \u0111\u1ed1i ph\u01b0\u01a1ng \u0111\u01a1n gi\u1ea3n<\/em>. \n<\/p>\n\n\n\n<p>\n  Th\u00e0nh ph\u1ea7n SOAP trong Web Service l\u00e0 m\u1ed9t giao th\u1ee9c thi\u1ebft l\u1eadp d\u1ef1a v\u00e0o XML \u0111\u01a1n gi\u1ea3n, cho ph\u00e9p c\u00e1c \u1ee9ng d\u1ee5ng trao \u0111\u1ed5i th\u00f4ng tin qua HTTP.\n<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-1067.png\" alt=\"web-service-la-gi\" class=\"wp-image-27762\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-1067.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-1067-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<h2 id=\"\"><a id=\"post-27759-_5g5j9fh1iztd\"><\/a><\/h2>\n\n\n\n<h2 id=\"\u01afu_v\u00e0_nh\u01b0\u1ee3c_\u0111i\u1ec3m_c\u1ee7a_Web_Service_\"><a id=\"post-27759-_qtimc21lual1\"><\/a><strong>\u01afu v\u00e0 nh\u01b0\u1ee3c \u0111i\u1ec3m c\u1ee7a Web Service <\/strong><\/h2>\n\n\n\n<h3 id=\"\u01afu_\u0111i\u1ec3m_\"><a id=\"post-27759-_zah722xwro9f\"><\/a><strong>\u01afu \u0111i\u1ec3m <\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Web Service cho ph\u00e9p ch\u01b0\u01a1ng tr\u00ecnh vi\u1ebft b\u1eb1ng nhi\u1ec1u ng\u00f4n ng\u1eef kh\u00e1c nhau v\u00e0 ho\u1ea1t \u0111\u1ed9ng tr\u00ean nhi\u1ec1u n\u1ec1n t\u1ea3ng v\u00e0 c\u00f3 th\u1ec3 giao ti\u1ebfp v\u1edbi nhau d\u1ef1a tr\u00ean m\u1ed9t n\u1ec1n t\u1ea3ng ti\u00eau chu\u1ea9n.    <\/li><li>D\u1ecbch v\u1ee5 Web kh\u00e1 \u0111\u01a1n gi\u1ea3n v\u00ec ch\u1ec9 s\u1eed d\u1ee5ng URL.    <\/li><li>L\u00e0m vi\u1ec7c v\u1edbi nh\u1eefng giao th\u1ee9c chu\u1ea9n Web nh\u01b0 XML, HTTP v\u00e0 <a href=\"https:\/\/tino.vn\/blog\/tcp-ip-la-gi\/\" target=\"_blank\" rel=\"noreferrer noopener\">TCP\/IP<\/a>.    <\/li><li>D\u1ecbch v\u1ee5 Web lu\u00f4n h\u1ed7 tr\u1ee3 t\u00ednh n\u0103ng b\u1ea3o m\u1eadt ch\u1eafc ch\u1eafn, \u0111\u1ea3m b\u1ea3o s\u1ef1 an to\u00e0n cho m\u00e1y ch\u1ee7 c\u01a1 s\u1edf d\u1eef li\u1ec7u.   <\/li><li>Vi\u1ec7c t\u00edch h\u1ee3p c\u00e1c h\u1ec7 th\u1ed1ng kh\u00e1c nhau s\u1ebd \u0111\u01b0\u1ee3c gi\u1ea3m b\u1edbt gi\u00e1 th\u00e0nh nh\u1edd Web Service.    <\/li><\/ul>\n\n\n\n<h3 id=\"Nh\u01b0\u1ee3c_\u0111i\u1ec3m_\"><a id=\"post-27759-_gs7bvdbdoorz\"><\/a><strong>Nh\u01b0\u1ee3c \u0111i\u1ec3m <\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>D\u1ecbch v\u1ee5 Web ph\u1ee5 thu\u1ed9c v\u00e0o t\u1ed1c \u0111\u1ed9 \u0111\u01b0\u1eddng truy\u1ec1n Internet.    <\/li><li>Trong tr\u01b0\u1eddng h\u1ee3p s\u1ef1 c\u1ed1 x\u1ea3y ra, Web Service kh\u00f4ng c\u00f3 kh\u1ea3 n\u0103ng kh\u00f4i ph\u1ee5c \u0111\u1ee7 tin c\u1eady nh\u1eb1m \u0111\u1ea3m b\u1ea3o c\u00e1c giao d\u1ecbch c\u00f3 th\u1ec3 tr\u1edf v\u1ec1 tr\u1ea1ng th\u00e1i ban \u0111\u1ea7u.    <\/li><li>Hi\u1ec7u su\u1ea5t t\u1ed1i \u01b0u c\u1ee7a Web Service s\u1ebd b\u1ecb \u1ea3nh h\u01b0\u1edfng \u0111\u00e1ng k\u1ec3 b\u1edfi s\u1ed1 l\u01b0\u1ee3ng c\u00e1c \u1ee9ng d\u1ee5ng c\u1ed9ng t\u00e1c c\u00f9ng ho\u1ea1t \u0111\u1ed9ng.   <\/li><li>V\u00ec Web Service s\u1eed d\u1ee5ng kh\u00e1 nhi\u1ec1u th\u00f4ng \u0111i\u1ec7p. Do \u0111\u00f3, h\u1ec7 th\u1ed1ng m\u00e1y ch\u1ee7 \u1ee9ng d\u1ee5ng v\u00e0 ki\u1ebfn tr\u00fac h\u1ea1 t\u1ea7ng h\u1ec7 th\u1ed1ng th\u00f4ng tin c\u1ee7a doanh nghi\u1ec7p c\u00f3 th\u1ec3 b\u1ecb ng\u01b0ng tr\u1ec7 n\u1ebfu s\u1ed1 l\u01b0\u1ee3ng giao d\u1ecbch trao \u0111\u1ed5i b\u00f9ng n\u1ed5.   <\/li><\/ul>\n\n\n\n<h2 id=\"Ki\u1ebfn_tr\u00fac_c\u1ee7a_Web_Service\"><a id=\"post-27759-_cbhv4s99i525\"><\/a><strong>Ki\u1ebfn tr\u00fac c\u1ee7a Web Service<\/strong><\/h2>\n\n\n\n<h3 id=\"Vai_tr\u00f2_c\u1ee7a_Web_Service\"><a id=\"post-27759-_t6lflvejrcej\"><\/a><strong>Vai tr\u00f2 c\u1ee7a Web Service<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Service Provider:<\/strong> \u0111\u00e2y l\u00e0 nh\u00e0 cung c\u1ea5p d\u1ecbch v\u1ee5 Web. Ch\u1ee9c n\u0103ng c\u1ee7a Service Provider l\u00e0 gi\u00fap tri\u1ec3n khai v\u00e0 cung c\u1ea5p c\u00e1c d\u1ecbch v\u1ee5 tr\u00ean Internet. \n  <\/li><li><strong>Service Requestor: <\/strong>\u0111\u00e2y l\u00e0 nh\u1eefng ng\u01b0\u1eddi ti\u00eau d\u00f9ng c\u1ee7a d\u1ecbch v\u1ee5 Web. H\u1ecd l\u00e0 nh\u1eefng ng\u01b0\u1eddi y\u00eau c\u1ea7u s\u1eed d\u1ee5ng d\u1ecbch v\u1ee5 Web b\u1eb1ng c\u00e1ch m\u1edf k\u1ebft m\u1ea1ng v\u00e0 g\u1eedi XML.\n  <\/li><li><strong>Service Registry: <\/strong>l\u00e0 m\u1ed9t th\u01b0 m\u1ee5c logic t\u1eadp trung c\u1ee7a d\u1ecbch v\u1ee5 Web. T\u1ea1i \u0111\u00e2y s\u1ebd cung c\u1ea5p kh\u00f4ng gian t\u1eadp trung, n\u01a1i m\u00e0 c\u00e1c nh\u00e0 ph\u00e1t tri\u1ec3n c\u00f3 th\u1ec3 xu\u1ea5t b\u1ea3n nh\u1eefng d\u1ecbch v\u1ee5 m\u1edbi ho\u1eb7c t\u00ecm ki\u1ebfm d\u1ecbch v\u1ee5 hi\u1ec7n c\u00f3. Do \u0111\u00f3, Service Registry cos vai tr\u00f2 nh\u01b0 m\u1ed9t thanh to\u00e1n b\u00f9 tr\u1eeb t\u1eadp trung cho c\u00e1c c\u00f4ng ty v\u00e0 d\u1ecbch v\u1ee5 c\u1ee7a h\u1ecd.\n  <\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-246.jpeg\" alt=\"web-service-la-gi\" class=\"wp-image-27763\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-246.jpeg 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2021\/07\/word-image-246-300x161.jpeg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<h3 id=\"Protocol_Stack_t\u1ea1i_Web_Service\"><a id=\"post-27759-_uha1a1bn0ir5\"><\/a><strong>Protocol Stack t\u1ea1i Web Service<\/strong><\/h3>\n\n\n\n<p>\n  B\u00ean c\u1ea1nh vi\u1ec7c d\u1ef1a v\u00e0o vai tr\u00f2 c\u1ee7a t\u1eebng y\u1ebfu t\u1ed1 trong Web Service, ki\u1ebfn tr\u00fac h\u1ea1 t\u1ea7ng c\u1ee7a d\u1ecbch v\u1ee5 Web c\u00f2n ph\u1ee5 thu\u1ed9c v\u00e0o Protocol Stack. C\u00e1c Stack v\u1eabn \u0111ang \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n v\u00e0 hi\u1ec7n t\u1ea1i c\u00f3 b\u1ed1n l\u1edbp ch\u00ednh l\u00e0: Service Transport, XML Messaging, Service Description, Service Discovery. \n<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Service Transport:<\/strong> \u1edf l\u1edbp n\u00e0y s\u1ebd ch\u1ecbu tr\u00e1ch nhi\u1ec7m v\u1eadn chuy\u1ec3n th\u00f4ng tin gi\u1eefa c\u00e1c \u1ee9ng d\u1ee5ng. Hi\u1ec7n t\u1ea1i, l\u1edbp n\u00e0y s\u1ebd c\u00f3 c\u00e1c th\u00e0nh ph\u1ea7n nh\u01b0: giao th\u1ee9c truy\u1ec1n t\u1ea3i v\u0103n b\u1ea3n Hyper (HTTP), giao th\u1ee9c th\u01b0 \u0111\u01a1n gi\u1ea3n (SMTP), giao th\u1ee9c truy\u1ec1n t\u1ec7p (FTP), giao th\u1ee9c trao \u0111\u1ed5i m\u1edf r\u1ed9ng kh\u1ed1i (BEEP). \n  <\/li><li><strong>XML Messaging:<\/strong> \u1edf l\u1edbp n\u00e0y s\u1ebd c\u00f3 tr\u00e1ch nhi\u1ec7m m\u00e3 h\u00f3a nh\u1eefng th\u00f4ng \u0111i\u1ec7p theo \u0111\u1ecbnh d\u1ea1ng XML ph\u1ed5 bi\u1ebfn, \u0111\u1ea3m b\u1ea3o c\u00f3 th\u1ec3 hi\u1ec3u c\u00e1c th\u00f4ng \u0111i\u1ec7p \u1edf hai \u0111\u1ea7u. L\u1edbp n\u00e0y bao g\u1ed3m c\u00e1c y\u1ebfu t\u1ed1: XML &#8211; RPC, SOAP.\n  <\/li><li><strong>Service Description:<\/strong> \u1edf l\u1edbp n\u00e0y s\u1ebd c\u00f3 tr\u00e1ch nhi\u1ec7m m\u00f4 t\u1ea3 giao di\u1ec7n c\u00f4ng c\u1ed9ng cho m\u1ed9t Web Service c\u1ee5 th\u1ec3. Hi\u1ec7n t\u1ea1i, c\u00e1c m\u00f4 t\u1ea3 d\u1ecbch v\u1ee5 \u0111\u01b0\u1ee3c x\u1eed l\u00fd th\u00f4ng qua ng\u00f4n ng\u1eef m\u00f4 t\u1ea3 Web Service l\u00e0 WSDL. \n  <\/li><li><strong>Service Discovery: <\/strong>\u1edf l\u1edbp n\u00e0y s\u1ebd c\u00f3 nhi\u1ec7m v\u1ee5 t\u1eadp trung nh\u1eefng d\u1ecbch v\u1ee5 v\u00e0o m\u1ed9t s\u1ed1 \u0111\u0103ng k\u00fd chung v\u00e0 cung c\u1ea5p ch\u1ee9c n\u0103ng xu\u1ea5t b\u1ea3n\/ t\u00ecm ki\u1ebfm d\u1ec5 d\u00e0ng. Hi\u1ec7n t\u1ea1i, vi\u1ec7c kh\u00e1m ph\u00e1 d\u1ecbch v\u1ee5 s\u1ebd \u0111\u01b0\u1ee3c x\u1eed l\u00fd th\u00f4ng qua vi\u1ec7c m\u00f4 t\u1ea3 chung, kh\u00e1m ph\u00e1 v\u00e0 t\u00edch h\u1ee3p (UDDI). \n  <\/li><\/ul>\n\n\n\n<p>\n  Tr\u00ean \u0111\u00e2y l\u00e0 nh\u1eefng ki\u1ebfn th\u1ee9c v\u1ec1 \u201cWeb Service l\u00e0 g\u00ec\u201d v\u00e0 c\u00e1c th\u00e0nh ph\u1ea7n li\u00ean quan \u0111\u1ebfn d\u1ecbch v\u1ee5 Web m\u00e0 Tino Group \u0111\u00e3 t\u1ed5ng h\u1ee3p \u0111\u1ec3 g\u1eedi \u0111\u1ebfn b\u1ea1n. Hy v\u1ecdng nh\u1eefng chia s\u1ebb n\u00e0y s\u1ebd gi\u00fap b\u1ea1n c\u00f3 nh\u1eefng gi\u1ea3i ph\u00e1p chuy\u1ec3n \u0111\u1ed5i d\u1eef li\u1ec7u t\u1ed1t nh\u1ea5t cho doanh nghi\u1ec7p nh\u00e9!\n<\/p>\n\n\n\n<h2 id=\"FAQs_v\u1ec1_Web_Service\"><a id=\"post-27759-_zh3if5c27e0b\"><\/a><strong>FAQs v\u1ec1 Web Service<\/strong><\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"S\u1eed_d\u1ee5ng_Web_Service_c\u00f3_t\u1ed1n_nhi\u1ec1u_chi_ph\u00ed_kh\u00f4ng?_\">S\u1eed d\u1ee5ng Web Service c\u00f3 t\u1ed1n nhi\u1ec1u chi ph\u00ed kh\u00f4ng? <\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>Nh\u1eefng d\u1ecbch v\u1ee5 c\u1ee7a Web Service s\u1eed d\u1ee5ng SOAP v\u1edbi giao th\u1ee9c HTTP v\u00e0 c\u00f3 th\u1ec3 tri\u1ec3n khai c\u00e1c d\u1ecbch v\u1ee5 v\u1edbi \u0111\u01b0\u1eddng truy\u1ec1n Internet khi\u00eam t\u1ed1n. Do \u0111\u00f3, b\u1ea1n c\u00f3 th\u1ec3 ti\u1ebft ki\u1ec7m ngu\u1ed3n chi ph\u00ed khi s\u1eed d\u1ee5ng gi\u1ea3i ph\u00e1p n\u00e0y <\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Web_Service,_client,_Service_c\u00f3_th\u1ec3_li\u00ean_k\u1ebft_v\u1edbi_nhau_kh\u00f4ng?_\">Web Service, client, Service c\u00f3 th\u1ec3 li\u00ean k\u1ebft v\u1edbi nhau kh\u00f4ng? <\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>\n  C\u00e2u tr\u1ea3 l\u1eddi: \u0110\u01b0\u1ee3c. Web Service c\u00f3 c\u01a1 s\u1edf ti\u00eau chu\u1ea9n m\u1edf XML. Do \u0111\u00f3,  Web Service, client, Server \u0111\u1ec1u c\u00f3 th\u1ec3 li\u00ean k\u1ebft v\u1edbi nhau trong m\u1ecdi tr\u01b0\u1eddng h\u1ee3p, \u1edf m\u1ecdi m\u00f4i tr\u01b0\u1eddng kh\u00e1c nhau. \n<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"N\u00ean_s\u1eed_d\u1ee5ng_REST_hay_SOAP_th\u00ec_t\u1ed1t_h\u01a1n?_\">N\u00ean s\u1eed d\u1ee5ng REST hay SOAP th\u00ec t\u1ed1t h\u01a1n? <\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>\n  B\u1ea1n n\u00ean s\u1eed d\u1ee5ng REST thay cho SOAP v\u00ec nh\u1eefng \u01b0u \u0111i\u1ec3m nh\u01b0 sau: REST c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng cho b\u1ea5t k\u1ef3 client n\u00e0o, nh\u1eb9 h\u01a1n SOAP r\u1ea5t nhi\u1ec1u c\u00f2n SOAP th\u00ec \u0111\u01b0\u1ee3c x\u00e2y d\u1ef1ng c\u00f4ng ngh\u1ec7 kh\u00e1 c\u0169, c\u00f2n nhi\u1ec1u b\u1ea5t c\u1eadp trong qu\u00e1 tr\u00ecnh s\u1eed d\u1ee5ng. \n<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"REST_v\u00e0_SOAP_c\u00f3_g\u00ec_kh\u00e1c_nhau?_\">REST v\u00e0 SOAP c\u00f3 g\u00ec kh\u00e1c nhau? <\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>\n  SOAP \u0111\u01b0\u1ee3c bi\u1ebft \u0111\u1ebfn l\u00e0 giao th\u1ee9c truy c\u1eadp \u0111\u1ed1i t\u01b0\u1ee3ng \u0111\u01a1n gi\u1ea3n c\u00f2n REST l\u00e0 chuy\u1ec3n giao tr\u1ea1ng th\u00e1i ph\u1ea3n h\u1ed3i. Ki\u1ebfn tr\u00fac c\u1ee7a SOAP s\u1ebd nh\u1eadn g\u1eedi message \u1edf d\u1ea1ng XML c\u00f2n REST l\u1ea1i bao g\u1ed3m nh\u1eefng quy t\u1eafc \u0111\u1ec3 thao t\u00e1c v\u1edbi Service. \n<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"S\u1eed d\u1ee5ng Web Service c\u00f3 t\u1ed1n nhi\u1ec1u chi ph\u00ed kh\u00f4ng? \",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Nh\u1eefng d\u1ecbch v\u1ee5 c\u1ee7a Web Service s\u1eed d\u1ee5ng SOAP v\u1edbi giao th\u1ee9c HTTP v\u00e0 c\u00f3 th\u1ec3 tri\u1ec3n khai c\u00e1c d\u1ecbch v\u1ee5 v\u1edbi \u0111\u01b0\u1eddng truy\u1ec1n Internet khi\u00eam t\u1ed1n. Do \u0111\u00f3, b\u1ea1n c\u00f3 th\u1ec3 ti\u1ebft ki\u1ec7m ngu\u1ed3n chi ph\u00ed khi s\u1eed d\u1ee5ng gi\u1ea3i ph\u00e1p n\u00e0y <\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Web Service, client, Service c\u00f3 th\u1ec3 li\u00ean k\u1ebft v\u1edbi nhau kh\u00f4ng? \",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>\n  C\u00e2u tr\u1ea3 l\u1eddi: \u0110\u01b0\u1ee3c. Web Service c\u00f3 c\u01a1 s\u1edf ti\u00eau chu\u1ea9n m\u1edf XML. Do \u0111\u00f3,  Web Service, client, Server \u0111\u1ec1u c\u00f3 th\u1ec3 li\u00ean k\u1ebft v\u1edbi nhau trong m\u1ecdi tr\u01b0\u1eddng h\u1ee3p, \u1edf m\u1ecdi m\u00f4i tr\u01b0\u1eddng kh\u00e1c nhau. \n<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"N\u00ean s\u1eed d\u1ee5ng REST hay SOAP th\u00ec t\u1ed1t h\u01a1n? \",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>\n  B\u1ea1n n\u00ean s\u1eed d\u1ee5ng REST thay cho SOAP v\u00ec nh\u1eefng \u01b0u \u0111i\u1ec3m nh\u01b0 sau: REST c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng cho b\u1ea5t k\u1ef3 client n\u00e0o, nh\u1eb9 h\u01a1n SOAP r\u1ea5t nhi\u1ec1u c\u00f2n SOAP th\u00ec \u0111\u01b0\u1ee3c x\u00e2y d\u1ef1ng c\u00f4ng ngh\u1ec7 kh\u00e1 c\u0169, c\u00f2n nhi\u1ec1u b\u1ea5t c\u1eadp trong qu\u00e1 tr\u00ecnh s\u1eed d\u1ee5ng. \n<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"REST v\u00e0 SOAP c\u00f3 g\u00ec kh\u00e1c nhau? \",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>\n  SOAP \u0111\u01b0\u1ee3c bi\u1ebft \u0111\u1ebfn l\u00e0 giao th\u1ee9c truy c\u1eadp \u0111\u1ed1i t\u01b0\u1ee3ng \u0111\u01a1n gi\u1ea3n c\u00f2n REST l\u00e0 chuy\u1ec3n giao tr\u1ea1ng th\u00e1i ph\u1ea3n h\u1ed3i. Ki\u1ebfn tr\u00fac c\u1ee7a SOAP s\u1ebd nh\u1eadn g\u1eedi message \u1edf d\u1ea1ng XML c\u00f2n REST l\u1ea1i bao g\u1ed3m nh\u1eefng quy t\u1eafc \u0111\u1ec3 thao t\u00e1c v\u1edbi Service. \n<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n\n\n","protected":false},"excerpt":{"rendered":"<p>V\u1ea5n \u0111\u1ec1 khai th\u00e1c d\u1eef li\u1ec7u t\u1eeb website vi\u1ebft b\u1eb1ng ng\u00f4n ng\u1eef n\u00e0y sang website \u0111\u01b0\u1ee3c vi\u1ebft b\u1eb1ng ng\u00f4n ng\u1eef kh\u00e1c lu\u00f4n x\u1ea3y ra tr\u1ee5c tr\u1eb7c v\u00e0 v\u00f4 c\u00f9ng kh\u00f3 kh\u0103n. \u0110\u00e2y \u0111\u01b0\u1ee3c xem l\u00e0 nh\u1eefng tr\u0103n tr\u1edf m\u00e0 ph\u1ea7n l\u1edbn doanh nghi\u1ec7p \u0111\u1ec1u g\u1eb7p ph\u1ea3i. T\u1eeb th\u1ef1c tr\u1ea1ng n\u00e0y, m\u1ed9t t\u00e0i nguy\u00ean th\u1ed1ng nh\u1ea5t [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":27760,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5404],"tags":[6242],"class_list":["post-27759","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webmasters","tag-kien-thuc-website"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/27759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=27759"}],"version-history":[{"count":0,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/27759\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/27760"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=27759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=27759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=27759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}