Distributed Systems SOAP, WSDL Standard Layers
Total Page:16
File Type:pdf, Size:1020Kb
Distributed Systems SOAP, WSDL Dr. Cesare Pautasso Computer Science Department Swiss Federal Institute of Technology (ETHZ) [email protected] http://www.inf.ethz.ch/~pautasso Standard Layers Discovery Messaging Description UDDI User Interface SOAPSOAP WSDL HTML XML HTTP TCP/IP ©IKS, ETH Zürich. 2 The Web services stack WSDL-based Semantic Web ebXML Messaging SOAP ebXML MSS Description WSDL RDF ebXML CPP Nonfunctional description WSEL Conversations WSCL ebXML WSCI WS- DAML-S BPSS Choreography Coordination BPEL4WS Business BPML BPML processes WSFL/XLANG Contracts ebXML CPA ebXML Discovery UDDI registries WS- Transactions Transactions BTP BTP SAML Security WS-Security S/MIME ©IKS, ETH Zürich. 3 HTTP, HTML and XML WWW basics The earliest implementations BROWSER were very simple and built directly upon the existing systems URL (client/server based on RPC, TP- INTERNET Monitors, or any other form of response middleware which allowed page interaction through a programmable client) the CGI script (or program) acted WEB SERVER as client in the traditional sense map URL to CGI script (for instance using RPC) execute CGI script The user clicked in a given URL get results back (stdout of CGI script) and the server invoked the script prepare response page corresponding to that URL send page to browser the script executed, produced the results and passed them back to the server (usually as the address Implemented of a web page) as a normal client CGI the server retrieved the page and script send it to the browser Existing Middleware Infrastructure ©IKS, ETH Zürich. WWW 5 HTTP as a communication protocol HTTP was designed for exchanging documents. It is almost like e-mail File being requested (in fact, it uses RFC 822 compliant (docu2.html) and mail headers and MIME types): version of the protocol Example of a simplified request (from browser to Web server): List of MIME types GET /docu2.html HTTP/1.0 accepted by the browser Accept: www/source Accept: text/html Accept: image/gif Information about the User-Agent: Lynx/2.2 libwww/2.14 * a blank line * environment where the browser is running If the “GET” looks familiar, it is not a coincidence. The document transfer protocol used is very End of request similar to ftp ©IKS, ETH Zürich. WWW 6 HTTP server side response Example of a response from the server (to the request by Protocol version, code indicating the browser): request status (200=ok) HTTP/1.0 200 OK Date: Wednesday, 02-Feb-94 Date, server identification (type) 23:04:12 GMT and format used in the request Server: NCSA/1.1 MIME-version: 1.0 Last-modified: Monday, 15- Nov-93 23:33:16 GMT Content-type: text/html MIME type of the document Content-length: 2345 being sent * a blank line * <HTML><HEAD><TITLE> . </TITLE> . .etc. </HTML> Header for the document (document length in bytes) Server is expected to convert the data into a MIME type Document content specified in the request (“Accept:” headers) ©IKS, ETH Zürich. WWW 7 Parameter passing The introduction of forms for POST request indicating the allowing users to provide information CGI script to execute (post-query) to a web server required to modify HTML (and HTTP) but it provided a GET can be used but requires the more advanced interface than just parameters to be sent as part of the retrieving files: URL: POST /cgi-bin/post-query HTTP/1.0 /cgi-bin/post-query?name=…&email=... Accept: www/source Accept: text/html Accept: video/mpeg As before Accept: image/jpeg ... Accept: application/postscript User-Agent: Lynx/2.2 libwww/2.14 Content-type: application/x-www- form-urlencoded Content-length: 150 * a blank line * &name = Cesare+Pautasso Data provided through the form &email= [email protected] and sent back to the server ... ©IKS, ETH Zürich. WWW 8 Contents and presentation HTML is a markup language HTML is based on SGML, that is, designed to describe how a the tags and the grammar used document should be displayed in HTML documents have been (the visual format of the defined using SGML. document). HTML is one of the many markup <h2>Table of contents</h2><a name=TOC></a> languages that exist, some of <ul> <li><a href="SG.htm">1 A Gentle Introduction them having being in use before to SGML</a></li> HTML even existed <li><a href="SG11.htm">2 What's Special about SGML? </a></li> Markup languages have been <ul> <li><a href="SG11.htm#SG111">2.1 Descriptive developed and are used in many Markup</a></li> industries (aircraft <li><a href="SG11.htm#SG112">2.2 Types of manufacturing, semiconductors, Document</a></li> <li><a href="SG11.htm#SG113">2.3 Data computer manuals). Markup Independence </a></li> languages provide a standardized </ul> <li><a href="SG12.htm">3 Textual grammar defining the meaning Structure</a></li> of tags and their use <li><a href="SG13.htm">4 SGML Structures</a></li> Markup languages use SGML, an <ul> <li><a href="SG13.htm#SG131">4.1 international text processing Elements</a></li> standard from the 80’s, to define <li><a href="SG13.htm#SG132">4.2 Content tag sets and grammars Models: An Example</a></li> </ul> ©IKS, ETH Zürich. WWW 9 HTML and XML HTML only provides primitives B2B applications require documents for formatting a document with that are much more structured so a human user in mind that they can be easily parsed and the information they contain Using HTML there is no way to indicate what are the contents extracted of a document (its semantics) To cope with this requirement, the XML standard was proposed For instance, a query to Amazon.com returns a book and Important aspects of XML: its price as an HTML document XML is not an extension to HTML XML is a simplified version of SGML a human has no problem that can be implemented in a Web interpreting this browser information once the XML is not a language but a “meta- browser displays it language” used to define markup to parse the document to languages automatically identify the XML tags have no standard price of the book is much meaning that can be interpreted by the browser. The meaning must be more complicated and an supplied as an addition in the form ad-hoc procedure (different of a style sheet or program for every bookstore) ©IKS, ETH Zürich. WWW 10 Data structures in XML <?xml version="1.0" ?> <!DOCTYPE trees SYSTEM "treefile.dtd"> ('Mouse':0.792449, <trees> (((('Human':0.105614, <tree> Mouse 'Chimp':0.171597 <branch> ):0.074558, <node> Bovine <specie> 'Gorilla':0.152701 'Mouse' ):0.048980, </specie> Gibbon </node> 'Orang':0.303652 <length> Orang ):0.121196, 0.792449 'Gibbon':0.336296 </length> ):0.485445, </branch> Gorilla <branch> 'Bovine':0.902183 <node> ):0.0; <branch> Human Chimp <node> DataData toto sendsend <branch> <node> <branch> <!ELEMENT trees (tree+)> <node> <branch> <!ELEMENT tree (branch,branch,branch?,length?)> <node> <!ELEMENT branch (node,length?)> <specie> 'Human' <!ELEMENT node ((branch,branch)|specie)> </specie> <!ELEMENT length (#PCDATA)> </node> ... <!ELEMENT specie (#PCDATA)> </tree> DTDDTD FileFile </trees> XMLXML FileFile ©IKS, ETH Zürich. WWW 11 DTDs and documents The goal of XML is to provide a Using XML is possible to standardized way to specify data exchange data through HTTP and structures so that when data is Web servers and process the data exchanged, it is possible to automatically understand what has been sent Note that the use of XML reduces The Document Type Definition the universality of the browser (DTD) specifies how the data since now a browser needs structure is described: processing additional programs to deal with instructions, declarations, specific markup languages comments, and elements developed using XML (somewhat Using the DTD, the XML similar to plug-ins but more document can be correctly encompassing in terms of interpreted by a program by functionality) simply parsing the document However, this is not much of a using the grammar provided by problem since the browser is for the DTD humans while XML is for The idea is similar to IDL except automated processing that instead of defining XML can be used as the parameters as combinations of intermediate language for standard types, a DTD describes marshalling/serializing arbitrary documents as semi- arguments when invoking structured data services across the Internet ©IKS, ETH Zürich. WWW 12 XML Schema A different problem related to What is different between XML accessing EAI systems through a Schema and DTDs?. XML web interface is the Schema: representation of relational data. uses the same syntax as If HTML is used, the data is XML (DTDs have a different formatted for presentation, not syntax) for processing provides a wider set of types If XML and DTDs are used, then (similar to those in SQL) the structured is better suited for processing but the processing is allows to define complex ad-hoc (one can define any DTD types from the basic types one wants) supports key and referential XML Schema has been proposed integrity constraints to allow database like query can be used by query processing over XML documents. languages (XQuery, for XML Schema is a data definition instance) to parse XML language for XML documents documents and treat them that allows to treat them as as relational data relational data in a standardized Can be used to specify the manner data model used by a Web service interface ©IKS, ETH Zürich. WWW 13 RPC across the Web Web Services and Client/Server | The Web service architecture proposed by IBM is based on two key concepts: UDDI architecture of existing synchronous middleware platforms current specifications of SOAP, UDDI and WSDL | The architecture has a remarkable client/server flavor | It reflects only what can be SOAP done with SOAP (Simple Object Access Protocol) UDDI (Universal Description and Discovery Protocol) WSDL (Web Services WSDL Description Language) ©IKS, ETH Zürich.