Web Services

Download Report

Transcript Web Services

สนับสนุน Power Point โดย ผศ. ดร. สมนึก คีรีโต



Web Services
How Web Services work?
Benefit of Web Services to B2B, G2G and G2B
e-Commerce
◦ Application-to-Application (A2A) Integration

Direction and trend of Web Services
Interoperability: ability to work among sysytems
 Different communication protocols
 Different platforms
Operating Systems
 Different programming languages
 Non-automated coordination

Technology drive from 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)
Difficulty in using and protocol

•
Popularity of Internet/WWW

Drive from adoption of XML standard
ยุคที่ 3
Web Services: A2A
ยุคที่ 2
publish, request & response
services (sw components)
Dynamic Web: HTML + Database
ยุคที่ 1
Static Web: HTML
publish, request & response HTML files


Next generation of “Web applications”
Standard to provide ability to publish “services” or
“Software components” and other web applications
such that SW Components can discover other SW
components and conduct business transactions.

Application-to-Application Interoperability
(through the webs)
Example of a scenario with full Interoperability




(not yet exist)
When “Bob” wants to make an appointment with a doctor
through web, the system checks the doctor’s and Bob’s
available times and then schedules both the doctor’s and
Bob’s calendars.
On the appointment day, the doctor wants to postpone
the appointment to later time, the new appointment time
will be automatically send to Bob’s mobile phone
Before meeting with the doctor, the system will connect
to Bob’s health insurance company to check the Bob’s
coverage contract.
When the doctor prescribes medicines for Bob, the
system will automatically send information to the drug
store for processing and update stock
Application Server
Legacy
Systems
Database Server
Web Server
อินเทอร์เน็ต
Web Server
ผูใ้ ช้ ใช้บราวเซอร์
และเข้าสู่บริ การจาก
เว็ปไซต์เดียว หรื อ
Web Server
Single Point of Services
One Stop Service
แต่ได้รับบริ การมาจากหลายที่
Application Server
Database Server

การเชือ
่ มโยงระบบสารสนเทศภายในองคกร
์
Enterprise Application Integration (EAI)
 การเชือ
่ มโยงระบบสารสนเทศทีม
่ ค
ี วามหลากหลาย
ภายในองคกร
์

ระบบรัฐบาลอิเล็กทรอนิกส์ e-Government
 ระบบการให้บริการประชาชนจากจุดเดียว eCitizen (G2G2C)
 ระบบการจัดซือ
้ จัดจ้างทางอิเล็กทรอนิกส์ (G2B eProcurement)

ระบบธุรกิจผานสื
่ ออิเล็กทรอนิกส์ e-Business
่
 การเชือ
่ มโยงระบบสารสนเทศของบริษท
ั ผู้ซือ
้ กับ
บริษท
ั ผู้ขาย


Data Interoperability +
Process Interoperability
ขีดความสามารถในการทางานขามระบบได
้
้
โดยใช้มาตรฐานกลางทางเทคนิคทีท
่ าให้เกิด
การแลกเปลีย
่ น ข้อมูล และ เรียกใช้งาน
โปรแกรม ขามระบบที
ม
่ ค
ี วามแตกตางกั
นทัง้
้
่
ฮารดแวร
์
์
์ และ ซอฟตแวร
์

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






Markup Language ทีผ
่ ้ใช
ู ้สามารถกาหนด tags ทีใ่ ช่
สื่ อความหมายของเนื้อหา และ กาหนดโครงสรางของ
้
เอกสาร
ขอมู
่ โี ครงสรางนี
้จะถูกนาไปประมวลผลตออย
าง
้ ลทีม
้
่
่
อัตโนมัตไิ ดง้ าย
่
ระบบสารสนเทศ
ของ บริ ษทั ผูซ้ ้ือ
ต้องการเชื่อมโยงกับ
ระบบสารสนเทศ
ของ บริ ษทั ผูข้ าย
เช่น ระบบข้อมูลสต็อก




Simple Object Access Protocol
A Distributed Objects technology standard
Send data via Internet/Web in form of XML
Easy to use with Request/Response HTTP
Protocol
SOAP – an XML-based protocol for calling
program in HTTP/Web Server
Remote Procedure Call via Web
program (Software Components) calling
across systems
Web Consortium (W3C) Support
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>
ต ัวอย่างโครงการ 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
Center Server
Gateway
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 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
Loans
Auto
Any-thing-to-Anything
Web Services Integration
Web services allows anything-toanything interoperability
between both internal and
external systems.
 UDDI
ยอมาจาก
Universal
่
Description, Discovery and
Integration
 นาเสนอโดยหลายบริษท
ั เช่น Ariba,
Microsoft, IBM, etc.
 บอกให้ทราบวาบริ
ษท
ั มีผลิตภัณฑและ
่
์
บริการอะไรบาง
้
 สามารถติดตอขอด
าเนินธุรกิจการคากั
่
้ บ
บริษท
ั ไดโดยอั
ตโนมัตโิ ดยผานทาง
Web
้
่
 WSDL
ยอมาจาก
Web Services
่
Description Language
่ เรียนรู้
 WSDL คือคูมื
่ อให้กับระบบ เพือ
วิธก
ี ารเรียกใช้งาน Web Services ที่
ตองการ
้
 WSDL เขียนขึน
้ ตามแบบมาตรฐาน
XML
 เนื่องจากทางานอยูบน
่
Internet ซึง่
ปัจจุบน
ั มีเทคโนโลยีในการรักษาความ
ปลอดภัยมากมายรองรับอยูแล
่ ว
้
 Web Services สามารถวิง
่ ผาน
Firewall
่
ไดเนื
้ ่องจาก SOAP ถูกส่งโดยผาน
่
โปรโตคอล HTTP
 ระบบรักษาความปลอดภัยตามมาตรฐาน
ของ PKI (Public Key Infrastructure)
เช่น MD5 (Message Digest), SSL





พันธมิตรทางการค้าสามารถเกิดขึน
้ ไดตลอดเวลา
้
โดยการค้นหาจาก UDDI
การดาเนินธุรกิจการค้าและบริการสามารถเป็ นไปได้
แบบอัตโนมัตใิ นระดับของ Application to
Application (A2A) โดยการแลกเปลีย
่ นขอมู
้ ลผานทาง
่
Web Services
Web Services สามารถใช้เป็ นส่วนหนึ่งในการดาเนิน
ธุรกิจตามเฟรมเวิรคของ
ebXML
์
งายต
อการน
าไปใช้งานเนื่องจากในปัจจุบน
ั มีเครือ
่ งมือ
่
่
มากมายทีใ่ ช้ช่วยเหลือในการพัฒนา Web Services
ลดตนทุ
ไ่ มจ
้ นในการพัฒนาระบบบางอยางที
่
่ าเป็ นโดย
ขอบริการจาก Web Services ของพันธมิตรทาง
Web Services เป็ นมาตรฐานทีง่ ายต
อการ
่
่
พัฒนาเนื่องจากอยูในรู
ปแบบของขอมู
่
้ ล
ตัวอักษร
 มีชุดเครือ
่ งมือทีส
่ นับสนุ นโดย Microsoft ตาม
แพลตฟอรมของ
Microsoft .NET
์
Framework
 มีชุดเครือ
่ งมือทีส
่ นับสนุ นโดย Sun
Microsystem ตามแพลตฟอรมของ
Sun
์
ONE (Sun Open Net Environment)
 มีชุดเครือ
่ งมือทีส
่ นับสนุ นโดย IBM เช่น Web
Services Toolkit
 เครือ
่ งมืออืน
่ ๆทีส
่ นับสนุ น SOAP, XML ทัง้ ที่






เป็ นทีย
่ อมรับในระดับโลก จากหลายๆหน่วยงานและ
องคกร
์
มีการใช้งานกันอยางกว
างขวางและถู
กใช้เป็ น
่
้
โครงสราง
้
พืน
้ ฐานสาหรับการประสานงานขามระบบ
้
มีบริการหลากหลายให้เลือกใช้ (สนใจดูตวั อยางได
่
้
จาก
xmethods.net และ salcentral.com)
เป็ นเครือ
่ งมือสาหรับการดาเนินธุรกิจออนไลน์ อีก
หลายอยางเช
่
่น
E-Commerce, E-Business, E-Learning,
E-Government, etc.
แนวทางการใชงานในประเทศไทยเชน โครงการ
การใช้ Web Services เพือ
่ ทาให้เกิด
Interoperability
 การใช้ Web Services และ UDDI เพือ
่
ดาเนินธุรกิจการคา้
 การรักษาความปลอดภัยของขอมู
้ ลสาหรับ
Web Services
 ขอดี
้ ยของ Web Services
้ และขอเสี
 ประโยชนของ
Web Services ตอการพั
ฒนา
์
่
ประเทศ
 ความเป็ นไปของ Web Services ในปัจจุบน
ั
และอนาคต

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
 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







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