Académique Documents
Professionnel Documents
Culture Documents
WebService Soup: The confusion WS-Addressing WSDL WS-Security WS-Eventing WS-N XACML REST WS-I SOAP SOA WS-Events SAML BPEL UDDI WSRF
Firstly
What is a WebService?
Goal is interoperability between enterprises Were getting there but it hasnt been an uneventful journey!
REST
Representational State Transfer SRU, OpenSearch etc. are NOT REST WebServices
But rather REST-like in that they use XML and HTTP but RESTnot the underlying philosophy of REST
True REST
URLs are nouns, not verbs The basic API (verbs) is C.R.U.D
Create Retrieve Update Delete
(HTTP POST) (HTTP GET) [no side effects] (HTTP PUT) (HTTP DELETE)
SOAP
Originally Simple Object Access Protocol but now SOAP stands for SOAP!
Originates from doing Remote Procedural Calls over XML and HTTP Microsoft initiated but moved to W3C Originally a number of competitors
XMLXML-RPC etc
LAN
Internet
More SOAP
<SOAP:Envelope xmlns:SOAP=..."> <SOAP:Header> </SOAP:Header> <SOAP:Body> <SRW:searchRetrieveRequest xmlns:SRW=..."> <SRW:version>1.1</SRW:version> <SRW:query>(dc.author exact "jones" and dc.title >= "smith")</SRW:query> <SRW:startRecord>1</SRW:startRecord> <SRW:maximumRecords>10</SRW:maximumRecords> <SRW:recordSchema>info:.../mods</SRW:recordsSchema> </SRW:searchRetrieveRequest> </SOAP:Body> </SOAP:Envelope>
SOAP Components
SOAP:Header
Not well used, but designed for messaging and relaying purposes e.g. telling proxies to rewrite sru:baseUrl
SOAP:Body
XML payload
SOAP:Faults
Error conditions
WSDL 1.1
Components
Types
XML representations of the types (typically XML Schema language) e.g. searchRetrieveRequestType XML messages built from types passed from client to server and server to client e.g. searchRetrieveRequest, searchRetrieveResponse Which messages are sent in which direction, and what the response is e.g. searchRetrieveRequest is sent client to server, and a searchRetrieveResponse sent back How to encode (e.g. SOAP document/literal) How to transport (e.g. HTTP, SMTP) Endpoint e.g. http://voyager.loc.gov:7090/
Messages
portTypes
Bindings
Services
Invisible WSDL
String foo(String s, Integer i) {}
WSDL Document
SOAP Encoding 1
} String foobar(foo);
SOAP use particular SOAP defined XML constructs for arrays etc.
<stuff xsi:type=xsd:string>hello</stuff> <numbers xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:integer[5]"> xsi:type="SOAPSOAP<item>10</item> <item>20</item> <item>30</item> <item>40</item> <item>50</item> </numbers>
SOAP Encoding:
<Distance> <p1 HREF="#id1"/> <p2 HREF="#id1"/> </Distance> <Point id="id1"> <x>10</x> <y>20</y> </Point>
XML Schema
</choice> Also generates String foo; String bar; (Although will raise an exception if both are non-null at serialization) non-
Consider
<choice> <element name=foo type=string /> <sequence> <element name=foo type=string /> <element name=bar type=string /> </sequence> </choice>
Early Axis (until 2005!) generated String foo; String foo; String bar;
Universal Description, Discovery and Integration (of WebServices) Provides a model of organisations and webservices Provides a WebService API for interacting with registries of WebServices
Template based searching (still issues to be resolved) Not well used outside of enterprise due to out of band contractual negotiations needed for inter-enterprise web services interPoor open source implementations for version 3.0
WSDL 2.0 WSWS-Addressing: indirection via server EPR (End Point References) WS- WSWS-N, WS-Events, WS-Evening: Notification publish/subscribe WSBPEL: WebService Workflow/Choreography WSRF: Representing resources through WebServices WSWS-Security: SAML, XACML, etc. for encryption, signing/validation and credential delegation ebXMLebXML-BP, OWL-S, Semantic Framework etc. for OWLpolicy/contractural negotiations
etc
Last word
Interoperability of WebServices have been a difficult road For more complex tasks (security, messaging, asynchronous etc.) there is still some difficulties ahead But we do have interoperability at the basic level and it is getting better