Web Services
Definisi Menurut W3C [6] Web service adalah suatu sistem perangkat lunak yang didisain untuk mendukung interaksi mesin ke mesin pada suatu jaringan. menurut Michael C. Daconta, Web Service adalah aplikasi perangkat lunak yang dapat ditemukan, diuraikan, dan diakses berdasarkan pada XML dan protokol standard Web pada intranet, extranet, dan Internet.
Example: Web based purchase What Is Web Services Example: Web based purchase Credit Response Credit Check Credit Service Invoice Purchase Order Consolidate Results Inventory Response PO Service Reserve Inventory Web services are self contained, self describing, modular applications that can be published, located, and invoked across the web. Web services perform functions, which can be anything from simple requests to complicated business processes". ---- According to IBM Figure Taken from Oracle Session id: 40024
Features Of Web Services Search / Use Directory Service Integration Service Description Service Publish Virtual Travel Agency B2B Migration Of Existing web Application Standards are the Base Communicate using messages Robust , Effective, Flexible Security Services Description Web Service Discovery Description Service Service Description B2B B2B Figure Taken from Intelligent agent course 2003/2004 by Dr. Omar Belakhdar
Why to use more than one computer? Distributed resources access to shared data access to shared programs access to CPU (e.g. many desktop PCs together), to memory, to special devices (e.g. printer) Complete independence on the internal implementation
Distributed architecture gives access to distributed resources development encapsulation maintainability, re-usability, legacy-awareness implementation independence requires adding a communication layer between parts synchronization of efforts including such nasty things as distributed garbage collection
Distributed architecture Waiting for requests (known location, known port) Sending requests, getting results Communication protocol, Data format Basic questions are: What kind of protocol to use, and what data to transmit What to do with requests on the server side A basic scenario of a distributed computing. RPC based communications. Various protocols.
Traditional CGI-based approach Waiting for requests (known location, known port) Sending requests, getting results Data as name/value pairs cgi-bin scripts: Data transmitted as name-value pairs (HTML forms) Transport over (state-less) HTTP protocol no standards for keeping user sessions (state-fullness) server side: a script is called A basic scenario of a distributed computing. RPC based communications. Various protocols.
Sending requests, getting results CORBA-based approach Waiting for requests (known location, known port) Sending requests, getting results Data in binary format CORBA: Data transmitted as objects (at least it looks like that) Transport (usually) over well standardised IIOP protocol user sessions (state-fullness) very inter-operable server side: an RPC call is made A basic scenario of a distributed computing. RPC based communications. Various protocols.
SOAP-based communication Waiting for requests (known location, known port) Sending requests, getting results Data in XML format SOAP: Data in a well-defined XML format Transport over various protocols HTTP, SMTP are the most used, perhaps because they are firewall-friendly server side: either an RPC call or a message delivered A basic scenario of a distributed computing. RPC based communications. Various protocols.
Web services A collection of XML-based technologies developed by the e-business community to address issues of: service discovery interoperable data exchange and/or application invocation service compositions (workflow, business processes) Major developers include: Apache, IBM, HP, SUN & Microsoft (.NET) http://www.webservices.org/
W3C (working group) definition "A Web service is a software application identified by a URI, whose interfaces and bindings are capable of being defined, described and discovered as XML artefacts. A Web service supports direct interactions with other software agents using XML based messages exchanged via internet-based protocols." http://www.w3c.org/TR/2002/WD-wsa-reqs-20020819
Characteristics of Web services Providing services to other computer programs (not to Web browsers) Interoperability between software applications running on different computers Loosely coupled Machine-processable Use of standards: XML, HTTP, SOAP, WSDL
Basic idea of Web services Exchange of messages Messages are encoded using XML SOAP – Using standard protocols to transport messages HTTP, SMTP, . . . • Message can be sent: – One-way: Call the service, but don’t expect an answer ! asynchronous messaging – Request / response: Call the service and wait for the response ¤ most common style ¤ synchronous messagging
SOAP (Simple Object Access Protocol) Extensible Markup Language (XML) Hypertext Transport Protocol (HTTP) Web Services Description Language (WSDL) Universal Discovery Description Integration (UDDI)
. Langkah 1, aplikasi klien menemukan informasi tentang Web Service A dalam suatu UDDI registry. Langkah 2, aplikasi klien mendapatkan WSDL untuk Web Service A dari UDDI registry untuk menentukan API milik Web Service A. Akhirnya, pada langkah 3 dan 4, aplikasi klien berkomunikasi dengan Web Service melalui SOAP, menggunakan API yang ditemukan dalam langkah 2.
State of the Art UDDI provides a mechanism for clients to find web services. WSDL defines services as collections of network endpoints or ports. A port is defined by associating a network address with a binding; a collection of ports define a service. SOAP is a message layout specification that defines a uniform way of passing XML-encoded data. It also defines a way to bind to HTTP as the underlying communication protocol. SOAP is basically a technology to allow for “RPC over the web”.
State of the Art UDDI WSDL SOAP URI HTML HTTP
Web Services Stack
SOAP (Simple Object Access Protocol) Extensible Markup Language (XML) Hypertext Transport Protocol (HTTP) Web Services Description Language (WSDL) Universal Discovery Description Integration (UDDI)
Standar SOAP memiliki dua bagian : SOAP adalah spesifikasi yang mendefinisikan tata tata bahasa XML untuk mengirim (request) dan menanggapi (respond) pesan yang diterima dari pihak lain. Standar SOAP memiliki dua bagian : Header yang membawa proses instruksi Body yang berisi payload (berisi informasi yang dikirim) Pesan SOAP ada 3 tipe : Dokumen (XML) RPC (Remote Procedure Calls)
XML Messaging Using SOAP
WSDL adalah sebuah spesifikasi yang berbasis XML yang digunakan untuk mendeskripsikan apa yang akan dilakukan oleh Web Service dan bagaimana untuk mengoperasikannya WSDL memiliki bagian-bagian yang berisi detail bagaimana membuat koneksi ke service disimpan
WSDL Web Services Definition Language http://www.w3.org/TR/wsdl/ An XML-based language for describing Web Services what the service does (description) how to use it (method signatures) where to find the service It does not depend on the underlying protocol But: It is not much human-readable
UDDI adalah sebuah spesifikasi XML yang menggambarkan bagaimana calon pelanggan dari layanan Web bisa belajar tentang kemampuannya dan memperoleh informasi dasar yang dibutuhkan untuk membuat kontak awal dengan situs Registry UDDI bisa public, private, atau semiprivate
UDDI (and alternatives) Universal Description, Discovery and Integration http://www.uddi.org UDDI creates a platform-independent, open framework & registry for: Describing services Discovering businesses Integrating business services The UDDI may be less used than predicted, especially on the Internet level BioMoby - an alternative for Life Sciences domain?
Mengintegrasikan sistem-sistem legacy Menurunkan biaya operasional Menurunkan biaya pengembangan software pengembangan sistem dilakukan lebih cepat Antarmuka yang lebih baik untuk pelanggan Integrasi yang lebih baik dengan partner bisnis Peluang pendapatan baru Merupakan model bisnis baru
Kesulitan tersembunyi dari Layanan Web : Masalah ketersediaan Matching Requirements Immutable Interfaces Guaranteed Execution Memiliki masalah pada performance nya Standarisasi Web service belum lengkap atau belum final