CIS 330: Applied Database Systems Lecture 36: Web Services Alan Demers ademers@cs.cornell.edu
Definition: Web Services • A standardized way of integrating Web-based applications, using • XML to tag data • SOAP to transport data • Simple Object Access Protocol • WSDL to describe available services • Web Services Description Language • An Interface Description Language (IDL) • UDDI to list available services • Universal Description, Discovery and Integration
Goals for B2B Integration • Service-Oriented Architecture • Redesign of middleware protocols • Standardization
Service-Oriented • Functionality always exposed as services • Loosely coupled • Invoked by programs as well as users
Middleware Redesign • Peer-to-Peer • Between trust domains • Compatibility with Internet
Standardization • In praise of motherhood ... • BUT - Web standards seem to have achieved much more traction than previous standards
Web Services Integrating Between Companies languages and protocols standardized, eliminating need for customer many different middleware infrastructures (need only the Web supplier Web services middleware) service Web service internal procurement requests internal internal infrastructure infrastructure interactions based on protocols Web redesigned for peer to peer service and B2B settings internal internal functionality made infrastructure available as a service warehouse
Basic Web Services • Components: • communicate (SOAP) • describe services - IDL (WSDL) • directory service (UDDI)
Minimalist Infrastructure ... service provider service requestor application object application object (service provider) (client) SOAP-based SOAP-based middleware middleware SOAP messages exchanged on top of, HTTP, SMTP, or other transport converts procedure calls to/from XML messages sent through HTTP or other protocols.
Using WSDL Specification <operation name="orderGoods"> WSDL of <input message = "OrderMsg"/> service provider </operation> WSDL compiler WSDL compiler (client side) (server side) service requestor service provider application object application object (service provider) (client) skeleton stub SOAP-based SOAP-based middleware middleware SOAP messages Note all WSDL “processing” happens at development time.
Using UDDI Registry service requestor service provider application object application object (client) (service provider) stub skeleton SOAP-based SOAP-based middleware middleware SOAP messages SOAP messages SOAP messages (to look for services) (to publish service description) SOAP-based middleware service descriptions UDDI registry
Simple Object Access Protocol • Specifies: • message format for one-way comms • specification for SOAP RPC • rules for processing SOAP messages • rules for transport - HTTP and SMTP
A SOAP Message SOAP envelope SOAP header header block SOAP body body block
SOAP over HTTP service requestor service provider SOAP HTTP HTTP SOAP engine engine engine engine client implementation service implementation (other tiers) (other tiers)
Simple Implementation service provider service requestor service client implementation implementation invokes the service invokes the local procedure of the service implementation as a local call server stub client stub the router parses the message, invoke SOAP engine to prepare SOAP message identifies the appropriate stub, and delivers the parsed message SOAP engine SOAP router packages SOAP into HTTP and passes the content of the passes it to an HTTP client that HTTP message to the router sends it to the provider HTTP engine HTTP server
WSDL Specifications WSDL specification • Abstract part abstract part • signatures, types operations messages • like traditional IDL operations • Concrete part port types • bindings / services / ports concrete part bindings services and ports
Concrete Part • Interface Bindings • message encoding & protocol bindings • Ports • interface binding + network address • Services • logical groupings of ports
Automatic Generation of WSDL WSDL of service provider 1 2 WSDL generator WSDL compiler WSDL compiler (client side) (server side) service requestor service provider application object application object (service provider) (client) stub skeleton SOAP-based SOAP-based middleware middleware SOAP messages
Recommend
More recommend