Web Services - iTManage.info

Download Report

Transcript Web Services - iTManage.info

Web Services
The Next Generation of Web
ขยายโอกาสและสร้างพ ันธมิตรทางธุรกิจด้วยเว็บเซอร์วส
ิ
ิ ณุ ประทิพย์เนตร
โดย นายชษ
สนับสนุน Power Point โดย
ผศ. ดร. สมนึก คีรโี ต
ผู ้ประสานงานโครงการ นวัตกรรมไอที เกษตร-เนคเทค
ผู ้ชว่ ยศาสตราจารย์ ภาควิชาวิศวกรรมคอมพิวเตอร์ ม. เกษตรศาสตร์
ผู ้อานวยการ ศูนย์พัฒนาพาณิชย์อเิ ล็กทรอนิกส ์ เนคเทค
30 April 2002, Computer Center
Web Services: The Next Generation of Web
sk 1
้ หา
เนือ




ความเป็นมาของ Web Services
ั
การทางานของ Web Services โดยสงเขป
สงิ่ ทีจ
่ าเป็นในการใชง้ าน Web Services
ประโยชน์ของ Web Services ต่อการสร้าง
พ ันธมิตร ทงั้ B2B, G2G และ G2B


Application-to-Application (A2A) Integration
ทิศทางของเทคโนโลยี Web Services ใน
ปัจจุบ ันและอนาคต
Web Services: The Next Generation of Web
sk 2
ปัญหาการประสานการทางานระหว่างระบบ





Interoperability คือขีดความสามารถ
ในการทางานระหว่างระบบ
ื่ สาร
ความแตกต่างของโปรโตคอลทีใ่ ชใ้ นการสอ
ความแตกต่างของแพลตฟอร์ม
Operating Systems
ความแตกต่างของภาษาโปรแกรมทีใ่ ช ้
ในการพ ัฒนาระบบ
้ ได้แบบอ ัตโนม ัติ
การประสานงานไม่สามารถเกิดขึน
Web Services: The Next Generation of Web
sk 3
ก่อนจะมาเป็น Web Services

แรงผล ักด ันจากเทคโนโลยี Distributed
่
Processing อย่างเชน








RPC (Remote Procedure Call)
RMI (Remote Method Invocation)
DCOM (Distributed Component Object Model)
CORBA (Common Object Request Broker
Architecture)
J2EE (Java 2 Platform, Enterprise Edition)
ความยากในการใชง้ านและความแตกต่างในแต่ละ
โปรโตคอล
แรงผล ักด ันจากความนิยมของ Internet/WWW
แรงผล ักด ันจากการยอมร ับในมาตรฐาน XML
Web Services: The Next Generation of Web
sk 4
ความง่าย และ วิว ัฒนาการของ Web
ยุคที่ 3
Web Services: A2A
ยุคที่ 2
publish, request & response
services (sw components)
Dynamic Web: HTML + Database
ยุคที่ 1
Static Web: HTML
publish, request & response HTML files
Web Services: The Next Generation of Web
sk 5
Web Services คือ อะไร


่ั ”
วิว ัฒนาการก้าวถ ัดไปของ “เว็ ปแอพพลิเคชน
มาตรฐานเปิ ดทีท
่ าให้เราสามารถ “ประกาศ”
(Publish) ว่ามี “บริการ” (Services หรือ ก้อน
โปรแกรมทีท
่ างานบริการบางอย่าง - Software
Components) และ
่ ั ” อืน
ื ค้น และ
“เว็ ปแอพพลิเคชน
่ สามารถเข้าไปสบ
้ ริการจากก้อนโปรแกรมนนได้
เรียกใชบ
ั้


SW Components can discover other SW
components and conduct business transactions.
Application-to-Application Interoperability
(through the webs)
Web Services: The Next Generation of Web
sk 6
A2A Interoperability
*
ต ัวอย่างเหตุการณ์ ทีม
่ ี Interoperability เต็มรูปแบบ
(ย ังไม่เป็นความจริงในปัจจุบ ัน)




“นาย ก” น ัดหมอผ่านเว็ป ระบบทาการตรวจตารางเวลาว่าง
ของหมอ และ ของคนไข้ แล้วจองเวลาลงในระบบปฏิทน
ิ ทงั้
ของคนไข้ และ ของหมอ
เมือ
่ ถึงว ันน ัดหมอขอเลือ
่ นเวลา ข้อมูลการเลือ
่ นเวลา และ
ั มอ
่ ไปทีโ่ ทรศพท์
เวลาน ัดใหม่ถก
ู สง
ื ถือของคนไข้โดย
อ ัตโนม ัติ
ื่ มโยงไปหาระบบประก ัน
ก่อนพบหมอ ระบบทาการเชอ
สุขภาพเพือ
่ ขอดูเงือ
่ นไขการประก ัน
่ ไปดาเนินการสง่ ั ยาทีร่ า้ นยา
เมือ
่ หมอสง่ ั ยา ข้อมูลยา ถูกสง
ี ธ
และ ต ัดบ ัญชท
ี่ นาคารโดยอ ัตโนม ัติ
* ความสามารถในการเรี ยกใช้งานโปรแกรมระหว่างระบบที่มีความแตกต่างกัน
Web Services: The Next Generation of Web
sk 7
C2WA2W2W2A Integration
Application Server
Legacy
Systems
Database Server
Web Server
อินเทอร์เน็ต
Web Server
ผูใ้ ช้ ใช้บราวเซอร์
และเข้าสู่ บริ การจาก
เว็ปไซต์เดียว หรื อ
Web Server
Single Point of Services
One Stop Service
แต่ได้รับบริ การมาจากหลายที่
Web Services: The Next Generation of Web
Application Server
Database Server
sk 8
แรงจูงใจ

ื่ มโยงระบบสารสนเทศภายในองค์กร
การเชอ
Enterprise Application Integration (EAI)


ื่ มโยงระบบสารสนเทศทีม
การเชอ
่ ค
ี วามหลากหลายภายในองค์กร
ระบบร ัฐบาลอิเล็ กทรอนิกส ์ e-Government



Applications-to-Applications Integration
ระบบการให้บริการประชาชนจากจุดเดียว e-Citizen (G2G2C)
้ื จ ัดจ้างทางอิเล็กทรอนิกส ์ (G2B e-Procurement)
ระบบการจ ัดซอ
ื่ อิเล็ กทรอนิกส ์ e-Business
ระบบธุรกิจผ่านสอ



ื่ มโยงระบบสารสนเทศของบริษ ัทผูซ
ื้ ก ับ บริษ ัทผูข
การเชอ
้ อ
้ าย
B2B e-Marketplace
e-Supply Chain Management
Web Services: The Next Generation of Web
sk 9
Interoperability


Data Interoperability +
Process Interoperability
ขีดความสามารถในการทางานข้ามระบบ
้ าตรฐานกลางทางเทคนิคที่
ได้ โดยใชม
ทาให้เกิดการแลกเปลีย
่ น ข้อมูล และ
เรียกใชง้ าน โปรแกรม ข้ามระบบทีม
่ ี
ความแตกต่างก ันทงั้ ฮาร์ดแวร์ และ
ซอฟต์แวร์
Web Services: The Next Generation of Web
sk 10
แนวทางของ Web Services

For data interoperability:
XML
For process interoperability:
SOAP
For services publication & discovery: UDDI
Web services description language: WSDL
Web Services Flow Language:
WSFL

e-Business XML/Next Generation EDI: ebXML




Web Services: The Next Generation of Web
sk 11
Service-Oriented Architecture (SOA)
Web Services: The Next Generation of Web
sk 12
XML – eXtensible Markup Language


้ ามารถกาหนด
Markup Language ทีผ
่ ใู ้ ชส
่ อ
ื่ ความหมายของเนือ
้ หา และ
tags ทีใ่ ชส
กาหนดโครงสร้างของเอกสาร
้ ะถูกนาไปประมวลผล
ข้อมูลทีม
่ โี ครงสร้างนีจ
ต่ออย่างอ ัตโนม ัติได้งา่ ย
Web Services: The Next Generation of Web
sk 13
ต ัวอย่าง XML Purchase Order
ระบบสารสนเทศ
ของ บริ ษทั ผูซ้ ้ือ
Web Services: The Next Generation of Web
ต้องการเชื่อมโยงกับ
ระบบสารสนเทศ
ของ บริ ษทั ผูข้ าย
เช่น ระบบข้อมูลสต็อก
sk 14
กาเนิดมาตรฐาน SOAP




Simple Object Access Protocol
เป็นมาตรฐานของเทคโนโลยี Distributed
Objects แบบหนึง่
่ ข้อมูลผ่าน Internet/Web ในรูปแบบ
สง
ของ XML
ง่ายในการใชง้ านด้วย Request/Response
HTTP Protocol
Web Services: The Next Generation of Web
sk 15
SOAP Services
SOAP – an XML-based protocol ทีท
่ าให้
เรียกโปรแกรมผ่านทาง HTTP/Web
Server ได้
Remote Procedure Call ผ่านทาง Web
ทาให้เกิดเรียกใชโ้ ปรแกรม (Software
Components) ข้ามระบบได้
Web Consortium (W3C) Support
Web Services: The Next Generation of Web
sk 16
SOAP Architecture
Web Services: The Next Generation of Web
sk 17
ื้ สน
ิ ค้า
ต ัวอย่าง SOAP Request สง่ ั ซอ
POST /Order HTTP/1.1
Host: www.northwindtraders.com
Content-Type: text/xml
Content-Length: nnnn
SOAPAction: "urn:northwindtraders.com:PO#UpdatePO"
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope"
xsi:schemaLocation=
"http://www.northwindtraders.com/schemas/NPOSchema.xsd">
<SOAP-ENV:Header xsi:type="Transaction">
<transactionID mustUnderstand="1">
10000000
</transactionID>
</SOAP-ENV:Header>
<SOAP-ENV:Body xsi:type="NorthwindBody">
<UpdatePO>
<orderID>0</orderID>
<customerNumber>999</customerNumber>
<item>89</item>
<quantity>3000</quantity>
<return>0</return>
</UpdatePO>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Web Services: The Next Generation of Web
sk 18
ต ัวอย่างโครงการ e-Government Data Exchange
Application
Web
browser
SOAP
HTML
HTTP /
HTTPS
HTTP /
HTTPS
SOAP
Servlet
Government
Data
Exchange
(GDX)
SOAP
HTTP /
HTTPS
SOAP
Gateway
Legacy Data
GDI Data
Application
Web Services: The Next Generation of Web
Center Server
Gateway
้ ฐาน = XML + SOAP
Web Services ขนพื
ั้ น
sk 19
Government Data Infrastructure
Web Services: The Next Generation of Web
sk 20
Business-to-Business
Online
Exchange
Inventory
Phone
Banking
Website Oracle Credit
Branches
People
Soft
CRM
DB2
Loans
Suppliers
B2B Spending:
At least $26 Billion in 2000
Mortgage
Auto
B2B Integration
B2B allows interoperability beyond the firewall, between a small
number of internal enterprise applications and a small number of
external applications and companies (e.g. online exchanges).
Web Services: The Next Generation of Web
sk 21
Web Services
Web Services Spending:
$25 Million in 2000
$250 Million in 2001
$5 billion in 2004
Industry State: Young
Online
Exchange
On-Premise
Locations
Credit
Card Co.
Affiliate
Banks
Inventory
Self-Service
Applications
Website
Mortgage
Brokers
Phone
Banking
Credit
Oracle
Suppliers
Partners
(CheckFree)
People
Soft
Branches
Credit
Agencies
CRM
Government
Mortgage
DB2
Web services allows anything-toanything interoperability
between both internal and
external systems.
Loans
Auto
Any-thing-to-Anything
Web Services Integration
Web Services: The Next Generation of Web
sk 22
ต ัวอย่างการประยุกต์ Web Services
Web Services: The Next Generation of Web
sk 23
The Standards
Web Services: The Next Generation of Web
sk 24
The Big Picture
Web Services: The Next Generation of Web
sk 25
UDDI คือ อะไร




UDDI ย่อมาจาก Universal Description,
Discovery and Integration
่ Ariba,
นาเสนอโดยหลายบริษ ัทเชน
Microsoft, IBM, etc.
บอกให้ทราบว่าบริษ ัทมีผลิตภ ัณฑ์และ
บริการอะไรบ้าง
สามารถติดต่อขอดาเนินธุรกิจการค้าก ับ
บริษ ัทได้โดยอ ัตโนม ัติโดยผ่านทาง Web
Services
Web Services: The Next Generation of Web
sk 26
WSDL คือ อะไร



WSDL ย่อมาจาก Web Services
Description Language
WSDL คือคูม
่ อ
ื ให้ก ับระบบ เพือ
่ เรียนรูว้ ธ
ิ ก
ี าร
เรียกใชง้ าน Web Services ทีต
่ อ
้ งการ
้ ตามแบบมาตรฐาน XML
WSDL เขียนขึน
Web Services: The Next Generation of Web
sk 27
ความปลอดภ ัยในการใชง้ าน Web Services



เนือ
่ งจากทางานอยูบ
่ น Internet ซงึ่ ปัจจุบ ันมี
เทคโนโลยีในการร ักษาความปลอดภ ัยมากมาย
รองร ับอยูแ
่ ล้ว
Web Services สามารถวิง่ ผ่าน Firewall ได้
่ โดยผ่านโปรโตคอล HTTP
เนือ
่ งจาก SOAP ถูกสง
ระบบร ักษาความปลอดภ ัยตามมาตรฐานของ PKI
่ MD5
(Public Key Infrastructure) เชน
(Message Digest), SSL (Secure Socket
Layer) และ PGP (Pretty Good Privacy)
Web Services: The Next Generation of Web
sk 28
ประโยชน์ของ Web Services ต่อการดาเนินธุรกิจการค้า





้ ได้ตลอดเวลา โดยการ
พ ันธมิตรทางการค้าสามารถเกิดขึน
ค้นหาจาก UDDI
การดาเนินธุรกิจการค้าและบริการสามารถเป็นไปได้แบบ
อ ัตโนม ัติในระด ับของ Application to Application (A2A)
โดยการแลกเปลีย
่ นข้อมูลผ่านทาง Web Services
่ นหนึง่ ในการดาเนินธุรกิจ
Web Services สามารถใชเ้ ป็นสว
ตามเฟรมเวิรค
์ ของ ebXML
ง่ายต่อการนาไปใชง้ านเนือ
่ งจากในปัจจุบ ันมีเครือ
่ งมือ
้ ว
่ ยเหลือในการพ ัฒนา Web Services
มากมายทีใ่ ชช
ลดต้นทุนในการพ ัฒนาระบบบางอย่างทีไ่ ม่จาเป็นโดยขอ
บริการจาก Web Services ของพ ันธมิตรทางการค้า
Web Services: The Next Generation of Web
sk 29
เครือ
่ งมือทีใ่ ชใ้ นการพ ัฒนา Web Services





Web Services เป็นมาตรฐานทีง่ า
่ ยต่อการพ ัฒนา
เนือ
่ งจากอยูใ่ นรูปแบบของข้อมูลต ัวอ ักษร
มีชุดเครือ
่ งมือทีส
่ น ับสนุนโดย Microsoft ตาม
แพลตฟอร์มของ Microsoft .NET Framework
มีชุดเครือ
่ งมือทีส
่ น ับสนุนโดย Sun Microsystem
ตามแพลตฟอร์มของ Sun ONE (Sun Open Net
Environment)
่ Web
มีชุดเครือ
่ งมือทีส
่ น ับสนุนโดย IBM เชน
Services Toolkit
เครือ
่ งมืออืน
่ ๆทีส
่ น ับสนุน SOAP, XML ทงที
ั้ เ่ ป็น
Commercial Product และ Open Source
Web Services: The Next Generation of Web
sk 30
Web Services ในปัจจุบ ันและอนาคต





เป็นทีย
่ อมร ับในระด ับโลก จากหลายๆหน่วยงานและองค์กร
มีการใชง้ านก ันอย่างกว้างขวางและถูกใชเ้ ป็นโครงสร้าง
้ ฐานสาหร ับการประสานงานข้ามระบบ
พืน
มีบริการหลากหลายให้เลือกใช ้ (สนใจดูต ัวอย่างได้จาก
xmethods.net และ salcentral.com)
เป็นเครือ
่ งมือสาหร ับการดาเนินธุรกิจออนไลน์ อีกหลาย
่
อย่างเชน
E-Commerce, E-Business, E-Learning,
E-Government, etc.
่ โครงการโครงสร้าง
แนวทางการใชง้ านในประเทศไทยเชน
้ ฐานสารสนเทศภาคร ัฐ (Government Data
พืน
Infrastructure)
Web Services: The Next Generation of Web
sk 31
สรุปสาระสาค ัญทีเ่ กีย
่ วก ับ Web Services






การใช ้ Web Services เพือ
่ ทาให้เกิด
Interoperability
การใช ้ Web Services และ UDDI เพือ
่ ดาเนิน
ธุรกิจการค้า
การร ักษาความปลอดภ ัยของข้อมูลสาหร ับ Web
Services
ี ของ Web Services
ข้อดีและข้อเสย
ประโยชน์ของ Web Services ต่อการพ ัฒนา
ประเทศ
ความเป็นไปของ Web Services ในปัจจุบ ันและ
อนาคต
Web Services: The Next Generation of Web
sk 32
Web Services Alliance
Web Services Interoperability Organization (WS-I)
 IBM, Microsoft, Intel, HP, SAP, BEA Systems,
Accenture, etc.
Mission
 Ensuring interoperability among different vendors
Action Plans
 To develop Tools for testing software conformance
to WS standards: SOAP, WSDL, UDDI
 To publish an architectural road map
Web Services: The Next Generation of Web
sk 33
สรุป

2002 ปี แห่ง “Web Services”

ั้ าด้านไอที ผล ักด ันโซลูชน
่ ั ด้าน Web Services, เชน
่
บริษ ัทชนน




คลืน
่ ลูกถ ัดไปของเว็ป



IBM – Software Infrastructure
Sun – Services on Demand, Sun One
Microsoft – Web Services, Microsoft .NET
จากการแลกไฟล์ HTML ระหว่าง เว็ปเซริ ฟ
์ เวอร์
มาเป็นการแลก “บริการ” (ก้อนโปรแกรม Software
Components) ระหว่างระบบสารสนเทศ โดยวิง่ ผ่านเว็ปเซริ ฟ
์ เวอร์
ประโยชน์




ื่ มระบบสารสนเทศภายในองค์กร
เชอ
ิ ธิภาพ
การปฏิบ ัติการอย่างมีประสท
การกระจายโปรแกรมบริการ
การนาโปรแกรมทีพ
่ ัฒนาแล้วมาใชง้ านใหม่
Web Services: The Next Generation of Web
sk 34
Resources
Web Services
 IBM’s Web Services:
http://www.alphaworkers.ibm.com/webservices
 Microsoft’s Web Services: http://msdn.microsoft.com/webservices
 IBM’s Web Services tool kit:
http://www.alphaworks.ibm.com/tech/webservicestoolkit
SOAP
 SOAP specification: http://www.w3.org/TR/SOAP
 Apache’s SOAP toolkit: http://xml.apache.org/soap/index.html
 Microsoft;s SOAP resources, http://msdn.mircosoft.com//soap
UDDI
 UDDI Specification: http://www.uddi.org
 Microsoft’s UDDI resources: http://msdn.microsoft.com/uddi
 IBM’s UDDI resource:
http://www.alphaworks.ibm.com/tech/UDDIreg
WSDL
 WSDL Specification: http://www.w3.org/TR/wsdl
Web Services: The Next Generation of Web
sk 35
Resources & References







XML Industry: http://xml.coverpages.org
XML Namespaces: http://jclark.com/xml/xmlns.htm
W3C’s Web Distributed Data Exchange:
http://www.wddx.org
Microsoft’s .NET: http://www.microsoft.com/net
Cobol Resources: (integrating Cobol into Web-based
applications) http://www.cobolreport.com
ebXML: (United Nations Center for Trade Facilitation and eBusiness & OASIS) http://www.ebxml.org
News: “High Tech Leader form Web Services Alliance”
http://www.commweb.com/article/IWK20020205S0010
Web Services: The Next Generation of Web
sk 36