WEB SERVICE ?>

WEB SERVICE

What is Web Service ?

  • “Software application identified by a URI, whose interfaces and bindings are capable of being defined, described, and discovered as XML artifacts” – W3C Web Services Architecture Requirements, Oct. 2002
  • “Programmable application logic accessible using Standard Internet Protocols…” – Microsoft
  • “An interface that describes a collection of operations that are network accessible through standardized XML messaging …” – IBM
  • “Software components that can be spontaneously discovered, combined, and recombined to provide a solution to the user’s problem/request … “ – SUN
  • Web services are typically application programming interfaces (API) or web APIs that are accessed via Hypertext Transfer Protocol (HTTP) and executed on a remote system hosting the requested services. Web services tend to fall into one of two camps: Big Web Services and RESTful Web Services… “ – Wikipedia

The Next Horizon for e-business

  • Allow companies to reduce the cost of doing e-business, to deploy solutions faster

–Need a common program-to-program communications model

  • Allow heterogeneous applications to be integrated more rapidly, easily and less expensively
  • Facilitate deploying and providing access to business functions over the Web

Web Service Architecture

wsa

  • Roles in Web Service architecture

–Service provider

  • Owner of the service
  • Platform that hosts access to the service

–Service requestor

  • Business that requires certain functions to be satisfied
  • Application looking for and invoking an interaction with a service

–Service registry

  • Searchable registry of service descriptions where service providers publish their service descriptions
  • Operations in a Web Service Architecture

–Publish

  • Service descriptions need to be published in order for service requestor to find them

–Find

  • Service requestor retrieves a service description directly or queries the service registry for the service required

–Bind

  • Service requestor invokes or initiates an interaction with the service at runtime

Web Service Stack

wss

Several programing models are available to web service developers. These models fall into two categories

1.REST Based : Representational State Transfer

2.SOAP / WSDL Based

RESTful Web Services

HTTP is the protocol in REST. Only four methods are available: GET, PUT, POST, and DELETE. A network administrator can easily follow what is going on with a RESTful service just by looking at the HTTP headers.

REST is a suitable technology for applications that do not require security beyond what is available in the HTTP infrastructure and where HTTP is the appropriate protocol.

Flickr, Google Maps provide RESTful web services

SOAP-based Web Services

In SOAP-based web services, Java utilites create a WSDL file based on the Java code in the web service

SOAP-based web services are suitable for heavyweight applications using complicated operations and for applications requiring sophisticated security, reliability

Amazon, Banking, Government using SOAP Based

SOAP

  • What is SOAP?

–Simple Object  Access Protocol

–SOAP is a communication protocol

–SOAP is for communication between applications

–SOAP is a format for sending messages

–SOAP is designed to communicate via Internet

–SOAP is platform independent

–SOAP is language independent

–SOAP is based on XML

–SOAP is simple and extensible

–SOAP will be developed as a W3C standard

  • SOAP 1.0: Microsoft, Userland, DevelopMentor

–Specific to COM and HTTP

  • SOAP 1.1: includes contributions from IBM and Lotus

–Substitutable transport binding (not just HTTP)

–Substitutable language binding (e.g. Java)

–Substitutable data encoding

–Completely vendor-neutral

–Independent of: programming language, object model, operating system, or platform

  • SOAP 1.2: current working draft from w3.org “XML Protocol” working group

SOAP Message Structure

  • Request and Response messages

–Request invokes a method on a remote object

–Response returns result of running the method

  • SOAP specification defines an “envelop”

–“envelop” wraps the message itself

–Message is a different vocabulary

–Namespace prefix is used to distinguish the two parts

soap

Architecture

architsoap

  • SOAP hides the technical choices and implementation details from both parties

Why SOAP?

  • Other distributed technologies failed on the Internet

–Unix RPC – requires binary-compatible Unix implementations at each endpoint

–CORBA – requires compatible ORBs

–RMI – requires Java at each endpoint

–DCOM – requires Windows at each endpoint

  • SOAP is the platform-neutral choice

–Simply an XML wire format

–Places no restrictions on the endpoint implementation technology choices

SOAP Usage Models

  • RPC-like message exchange

–Request message bundles up method name and parameters

–Response message contains method return values

–However, it isn’t required by SOAP

  • SOAP specification allows any kind of body content

–Can be XML documents of any type

–Example:

  • Send a purchase order document to the inbox of B2B partner
  • Expect to receive shipping and exceptions report as response

WSDL

  • What is WSDL?

–Web Service Description Language

–WSDL is written in XML

–WSDL is an XML document

–WSDL is used to describe Web services

–WSDL is also used to locate Web services

–WSDL is not yet a W3C standard

  • Operational information about the service

–Location of the service

–Service interface

–Implementation details for the service interface

WSDL Document Structure

  • <portType> element

–Defines a web service, the operations that can be performed, and the messages that are involved

  • <message> element

–Defines the data elements of an operation

–consists of one or more parts.

–The parts can be compared to the parameters of a function call in a traditional programming language

  • <types> element

–Defines the data type that are used by the web service

–For maximum platform neutrality, WSDL uses XML Schema syntax to define data types

  • <binding> element

–Defines the message format and communication protocols used by the web service

UDDI

  • What is UDDI?

–Universal Description, Discovery and Integration

–Directory service where businesses can register and search for Web services

  • Directory for storing information about web services
  • Directory of web service interfaces described by WSDL

–UDDI communicates via SOAP

  • What is UDDI Based On?

–Uses W3C Internet standards such as XML, HTTP, and DNS protocols

–UDDI uses WSDL to describe interfaces to web services

UDDI Roles and Operations

uddi

  • Service Registry

–Provides support for publishing and locating services

–Like telephone yellow pages

  • Service Provider

–Provides e-business services

–Publishes these services through a registry

  • Service requestor

–Finds required services via the Service Broker

–Binds to services via Service Provider

UDDI Benefits

  • Making it possible to discover the right business from the millions currently online
  • Defining how to enable commerce once the preferred business is discovered
  • Reaching new customers and increasing access to current customers
  • Expanding offerings and extending market reach

Types of  UDDI nodes 

  • Internal Enterprise Application UDDI node

–Web Services for use within a company for internal enterprise application integration

–The scope can be single application, departmental, corporate

–Sit behind the firewall

–Allow the service providers more control over their service registry and its accessibility

  • Portal UDDI node

–Web Services published by a company for external partners to find and use

–Runs outside the service provider’s firewall

–Contains only those service descriptions that a company wishes to provide to service requestors from external partners

  • Partner catalog UDDI node

–Web services to be used by a particular company

–Runs behind the firewall

–Contains only approved, tested and valid Web service descriptions for legitimate business partners

  • E-Marketplace UDDI node

–Web Services that the service provider intends to compete for requestors’ business with other Web Services

–Hosted by an industry standards organization or consortium

–Contains service descriptions from businesses in a particular industry

 

 

 

 

Source :

  • Chiyoung Seo,Dept. of Computer Science,   University of Southern California
  • www.ibm.com/developerWorks/webservices

Leave a Reply

Your email address will not be published. Required fields are marked *