web services web services
play

Web Services Web Services UDDI managing registries of Web services - PowerPoint PPT Presentation

Objectives Objectives SOAP exchanging XML messages on a network An Introduction An Introduction to XML and Web Technologies to XML and Web Technologies WSDL describing interfaces of Web services Web Services Web Services


  1. Objectives Objectives � SOAP – exchanging XML messages on a network An Introduction An Introduction to XML and Web Technologies to XML and Web Technologies � WSDL – describing interfaces of Web services Web Services Web Services � UDDI – managing registries of Web services Anders Møller & Michael I. Schwartzbach  2006 Addison-Wesley An Introduction to XML and Web Technologies 2 What is a Web Service? Why a New Framework? What is a Web Service? Why a New Framework? � Web Service: � CORBA, DCOM, Java/RMI, ... already exist “software that makes services available on a network using technologies such as XML and HTTP” � XML+HTTP: platform neutral, widely accepted and utilized � Service-Oriented Architecture (SOA): “development of applications from distributed collections of smaller loosely coupled service providers” An Introduction to XML and Web Technologies 3 An Introduction to XML and Web Technologies 4 1

  2. What do We Need? A Recipe Server with XML and HTTP What do We Need? A Recipe Server with XML and HTTP � We already know how to � Ad hoc, RPC-style: • represent information with XML • Recipes getReci Recipes pes() • Lock lockRecipe cipe(ID) • communicate with HTTP • void writeRecip ecipe(Lock,Recipe) • void unlockReci Recipe pe(Lock) � Fault tolerance ad hoc solutions � Intermediaries vs. � RPC use of standards? � Interface descriptions � Locating services � ... An Introduction to XML and Web Technologies 5 An Introduction to XML and Web Technologies 6 Example Request ( writeRecipe ) Example Response ( lockRecipe ) Example Request ( writeRecipe ) Example Response ( lockRecipe ) writeRecipe writeRecipe lockRecipe lockRecipe POST /personal/jdoe/recipeserver HTTP/1.0 Host: www.widget.inc Content-Type: text/xml HTTP/1.1 200 OK Content-length: 5714 Date: Tue, 26 Sep 2006 22:29:08 GMT+1 Content-Type: text/xml <?xml version="1.0"?> Content-Length: 101 <call xmlns="http://www.brics.dk/ixwt/xmlrpc" xmlns:rcp="http://www.brics.dk/ixwt/recipes"> <?xml version="1.0"?> <operation>writeRecipe</operation> <return xmlns="http://www.brics.dk/ixwt/xmlrpc"> <arg>4DHX5ZV3D871AQ09</arg> 4DHX5ZV3D871AQ09 <arg> </return> <rcp:recipe id="r105"> <rcp:title>Cailles en Sarcophages</rcp:title> <rcp:date>Tue, 26 Sep 06</rcp:date> ... </rcp:recipe> </arg> </call> An Introduction to XML and Web Technologies 7 An Introduction to XML and Web Technologies 8 2

  3. XML- -RPC RPC Web Service Standards XML Web Service Standards � A (too) simple RPC protocol based on � SOAP SERVICE XML and HTTP � WSDL REGISTRY � UDDI find publish � Close to the ad hoc approach in the � WS-* SERVICE SERVICE Recipe Server... • WS-Addressing USER messages PROVIDER • WS-ReliableMessaging • WS-Security, WS-Policy • WS-Resource • WS-Choreography (WS-CDL) • WS-BPEL (aka. BPEL4WS) UNDER DEVELOPMENT! • WS-Coordination, WS-AtomicTransaction, WS-CAF • ... An Introduction to XML and Web Technologies 9 An Introduction to XML and Web Technologies 10 SOAP The SOAP Processing Model SOAP The SOAP Processing Model � Used to be “ S imple O bject A ccess P rotocol”, INTERMEDIARY INTERMEDIARY but no longer an acronym... INITIAL SENDER ULTIMATE RECEIVER INTERMEDIARY � Processing Model SOAP Envelope: � Data Representation and RPC <Envelope xmlns="http://www.w3.org/2003/05/soap-envelope"> <Header>...</Header> � Binding to transport protocols (e.g. HTTP) <Body>...</Body> </Envelope> An Introduction to XML and Web Technologies 11 An Introduction to XML and Web Technologies 12 3

  4. Envelope Headers A SOAP Message Envelope Headers A SOAP Message � Encryption information <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:w="http://www.widget.inc/shop" � Access control xmlns:n="http://notaries.example.org"> <env:Header> � Routing <w:ticket>54B42CF401A</w:ticket> <n:token> � Auditing <n:value>32158546</n:value> <n:issuer>http://notarypublic.example.com</n:issuer> � Data extensions </n:token> </env:Header> � ... <env:Body> <w:buy> <w:product>light gadget</w:product> <w:amount>430</w:amount> </w:buy> </env:Body> </env:Envelope> An Introduction to XML and Web Technologies 13 An Introduction to XML and Web Technologies 14 Special SOAP Header Attributes Another Example Special SOAP Header Attributes Another Example � role <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:c="http://encodings.example.org" • next xmlns:r="http://routings.example.org"> <env:Header> • ultimateReceiver <c:encoding env:role env:role="ht ="http://e tp://encod ncodings ings.examp .example.o le.org/d rg/decoder ecoder" env: env:must mustUnde Understand rstand="tr ="true" ue"> • none gzip+base64 � mustUnderstand </c:encoding> <r:route env:rel env:relay=" ay="true true" � relay env:rol nv:role= e= "http:/ http://www /www.w3. .w3.org/20 org/2003/0 03/05/so 5/soap-env ap-envelop elope/ro e/role/nex le/next"> � encodingStyle <r:node>130.225.16.12</r:node> <r:node>10.11.40.201</r:node> </r:route> </env:Header> <env:Body> H4sICACI/0EAA3EA80jNycnXUSjPL8pJUeQCABinVXsOAAAA </env:Body> </env:Envelope> An Introduction to XML and Web Technologies 15 An Introduction to XML and Web Technologies 16 4

  5. Faults SOAP Encoding Faults SOAP Encoding <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" XML serialization of data graphs xmlns:w="http://www.widget.inc/shop"> <env:Body> <env env:F :Fau ault> lt> <e <env nv:C :Code ode> name Zacharias Doe <env <e nv:Va :Value lue>e >env: nv:Se Send nder< er</en /env: v:Val Value ue> <e <env nv:Su :Subco bcode de> father <e <env: nv:Val Value ue>w:InvalidBuyRequest</env </env:Va :Valu lue> e> spouse </ </en env:S v:Subc ubcod ode> e> name name </en </ env: v:Cod Code> e> Jane Dow John Doe spouse <env <e nv:R :Reas eason> on> <e <env nv:Te :Text xm xt xml:l l:lan ang= g="en "en"> "> mother father The value of 'amount' is invalid! </ </en env:T v:Text ext> <env <e nv:Te :Text xm xt xml:l l:lan ang= g="da "da"> "> Værdien af 'amount' er ugyldig! family name </ </en env:T v:Text ext> </en </ env: v:Rea Reason son> Jack Doe </en /env: v:Fa Fault ult> </env:Body> </env:Envelope> An Introduction to XML and Web Technologies 17 An Introduction to XML and Web Technologies 18 SOAP Encoding, cont. RPC in SOAP SOAP Encoding, cont. RPC in SOAP <env:Envelope <family xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:enc="http://ww xmlns: enc="http://www.w3.org/2003/ w.w3.org/2003/05/soap-encodi 05/soap-encoding" ng" xmlns:rs="http://www.brics.dk/ixwt/recipeserver" env:en env:encodingStyle= codingStyle= xmlns:rcp="http://www.brics.dk/ixwt/recipes"> "http://www.w3.org/2003/05/ "http://www.w 3.org/2003/05/soap-encoding" soap-encoding" <env:Body> xmlns="http://www.widget.inc/encoding"> <rs:writeR <rs:writeRecipe env:enco ecipe env:encodingStyle= dingStyle= <name>Jack Doe</name> "http://www.w3.org/2003/05/s "http://www.w3 .org/2003/05/soap-encoding"> oap-encoding"> <father enc:id="1"> <rs:lock>4DHX5ZV3D871AQ09</rs:lock> <rs:lock </rs:lock> <name>John Doe</name> <rs:recipe env:encodin <rs:reci pe env:encodingStyle= gStyle= <father> "http://xml.ap "http://xml.apache.org/xml-s ache.org/xml-soap/literalxml oap/literalxml"> "> <name>Zacharias Doe</name> <rcp:r <rcp:recipe id="r105 ecipe id="r105"> "> </father> <rcp <rcp:title> :title>Cailles en Sarcophages</rcp:title> </rcp:title> <spouse enc:ref="2"/> <rcp <rcp:date> :date>Tue, 26 Sep 06</rcp:da </rcp:date> te> </father> ... <mother enc:id="2"> </rcp: </rcp:recipe> recipe> <name>Jane Dow</name> </rs:rec </rs:recipe> ipe> <spouse enc:ref="1"/> </rs:writeRecipe> </rs:write Recipe> </mother> </env:Body> </family> </env:Envelope> An Introduction to XML and Web Technologies 19 An Introduction to XML and Web Technologies 20 5

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend