Platform Choices: Web Services Web Services Description Language Platform Choices: Web Services What is WSDL? • • • • Web Services Description Language It is equivalent of IDL for Web Services It is in XML Schema format It defines an EXTENSIBLE framework for specifying Web Services interfaces • Developed originally by Microsoft and IBM, and now being put through its paces in W3C. • W3C working on Version 1.2 of WSDL right now (Fall 2005). Web Services: WSDL Platform Choices: Web Services What does WSDL support? • • • • • • • Data type definitions Messages supported Operations supported Port type (an aggregation of messages and operations) Binding (what protocol supports the service – ala SOAP) Port – target address where service is available Service – aggregation of port types Web Services: WSDL Platform Choices: Web Services WSDL service Web Service Port Type Port Type Port Type Operation OperationOperation Operation OperationOperation Operation OperationOperation Binding Binding Binding BindingBinding Binding Binding Binding Binding • WSDL specifications are published in a URL. • Clients download this specification, pick a particular protocol to communicate with the service (binding), and use that protocol. Web Services: WSDL Platform Choices: Web Services Simple Object Access Protocol (SOAP) Platform Choices: Web Services SOAP: What is it? A Simple Protocol that allows you to Access an Object through the net. Web Services: SOAP Courtesy: Yan Liu, my student. Platform Choices: Web Services SOAP Motivations • Heterogeneous systems must be able to communicate • Binary protocols don’t always work – CORBA, DCOM, etc. don’t work well through firewalls – Nobody can agree on a standard binary format (usually due to platform-related issues) – We’re dealing with many heterogeneous environments (MVS, Unix, Windows NT, Linux, PalmOS, etc.) – Component runtimes differ – Security models differ (Kerberos, NTLM, OSF-DCE) Web Services: SOAP Courtesy: Yan Liu, my student. Platform Choices: Web Services SOAP is a specification for defining… – an encoding style that uses XML to represent information graphs – a standard way to move XML with HTTP – rules for passing messages – error (fault) definition – a medium for performing Remote Procedure Calls (RPC) – one layer in a multi-layer architecture Web Services: SOAP Courtesy: Yan Liu, my student. Platform Choices: Web Services SOAP contains four parts: • An extensible envelope expressing (mandatory): – what features and services are represented in a message; – who should deal with them, – whether they are optional or mandatory. • A set of encoding rules for data (optional): – Exchange instances of application-defined data types and directed graphs – Uniform model for serializing abstract data models that can not directly be expressed in XML schema • A convention for representation RPC (optional) – How to make calls and responses • A protocol binding to HTTP and HTTP-EF (optional) Web Services: SOAP Courtesy: Yan Liu, my student. Platform Choices: Web Services <Envelope> <Header> SOAP: a simple example <transId>1234</transId> </Header> <Body> <Add> c = Add(a, b) <a>3</a> <b>4</b> </Add> </Body> </Envelope> Courtesy: Yan Liu, my student. Web Services: SOAP Platform Choices: Web Services <Envelope> <Header> System Flow (HTTP) <transId>1234</transId> </Header> <Body> <Add> <a>3</a> <b>4</b> </Add> </Body> </Envelope> <Envelope> <Header> <transId>1234</transId > </Header> <Body> <AddResponse> <c>7</c> </AddResponse> </Body> </Envelope> Courtesy: Yan Liu, my student. Platform Choices: Web Services SOAP: example from healthcare Example Request <soap:Envelope> <header> …. </header> <soap:Body> <GetName> <MR#>123456</MR#> </GetName> </soap:Body> </soap:Envelope> Example Response <soap:Envelope> <header> …. </header> <soap:Body> <GetNameResponse> <Name>John Doe</Name> </GetNameResponse> </soap:Body> </soap:Envelope> Web Services: SOAP Platform Choices: Web Services SOAP execution Application Web Service Interface Semantics Interface Semantics Envelope/Header/Body Envelope/Header/Body Message Encoding Message Encoding Transport (e.g. HTTP) Transport (e.g. HTTP) TCP/IP TCP/IP Courtesy: Yan Liu, my student. Platform Choices: Web Services SOAP: Conclusions • Basis for Web services • Significant component of Microsoft’s .NET platform • Supported by everyone • Has a strong future Web Services: SOAP Platform Choices: Web Services Universal Description, Discovery and Integration: (UDDI) Platform Choices: Web Services UDDI: What is it? • A vehicle to locate operational web services • Similar to Domain Name Service (DNS) lookup • Embodies the concepts of “White Pages” and “Yellow Pages” Web Services: UDDI Platform Choices: Web Services UDDI elements • White Pages: Business Name, Contact Info, DUNS, etc. • Yellow Pages: Business categories, key-value pairs of relevant information • Green Pages: Technical information on how to connect to web services Web Services: UDDI Platform Choices: Web Services UDDI process supported • Business registers its web service (information that is put in white, yellow and green pages) • The information gets propagated to all UDDI servers (replicated) • Customers contact known registries • Locate appropriate services and invoke them • Main protocol supported is SOAP Web Services: UDDI Platform Choices: Web Services Web Services: current status • Evolving rapidly – strong support for SOAP, and decent support for WSDL • UDDI is a little further away. • All vendors are incorporating various components of Web Services • Web Services is the future; right now people have to deal with other component technologies