Docstoc

Web Services in Java

Document Sample
Web Services in Java Powered By Docstoc
					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.
                                   What Is Web Services




                        Example: Web based purchase


                                                                            Credit
                                                                           Service
                        Purchase       Consolidate
                         Invoice
                          Order          Results

                                      PO Service



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



                                                                                                       Integration
                                       Description




                                                                                                         Service
                                        Service
                                                                         Directory
                                                                          Service

                                                                                                                     Virtual Travel
                                                                                                                     Agency


                                                     Description
                                                      Service
                                                                                 Migration Of Existing web Application
                                                                    Service
                                                                                 Standards are the Base
                                                                   Description
                                                                                 Communicate using messages

                                                                                 Robust , Effective, Flexible Security

                                                                                 Services Description

                                                                                 Web Service Discovery
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                                                Sending
 requests            Communication protocol, Data format   requests,
 (known location,                                           getting
   known port)
                                                             results




• Basic questions are:
    – What kind of protocol to use, and what data to
      transmit
    – What to do with requests on the server side
 Traditional CGI-based approach

 Waiting for                                          Sending
 requests                Data as name/value pairs    requests,
 (known location,                                     getting
   known port)
                                                       results




• 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
               CORBA-based approach

 Waiting for                                        Sending
 requests                Data in binary format     requests,
 (known location,                                   getting
   known port)
                                                     results




• 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
       SOAP-based communication

 Waiting for                                             Sending
 requests                    Data in XML format         requests,
 (known location,                                        getting
   known port)
                                                          results




• 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
                 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)
• 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

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:17
posted:10/19/2011
language:Indonesian
pages:32