Top Banner
WSDL, UDDI, SOAP, WSDL, UDDI, SOAP, REST: REST: SOA Acronym Soup SOA Acronym Soup Matthew J. Dovey Matthew J. Dovey Oxford University Oxford University
28

WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Jan 19, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

WSDL, UDDI, SOAP, WSDL, UDDI, SOAP, REST: REST:

SOA Acronym SoupSOA Acronym SoupMatthew J. DoveyMatthew J. Dovey

Oxford UniversityOxford University

Page 2: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

WebService Soup: The WebService Soup: The confusionconfusion

REST SOAP

WSDL

UDDI

WS-Addressing

WSRF

SOA

WS-N

WS-Events

WS-Eventing

BPEL

WS-Security

SAML

XACMLWS-I

Page 3: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Firstly…Firstly…

What is a What is a WebService?WebService?

Goal is interoperability Goal is interoperability between enterprisesbetween enterprises We’re getting there but it hasn’t been an We’re getting there but it hasn’t been an

uneventful journey!uneventful journey!

Page 4: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

RESTREST

Representational State TransferRepresentational State Transfer

SRU, OpenSearch etc. are SRU, OpenSearch etc. are NOTNOT REST REST WebServicesWebServices But rather “REST-like” in that they use XML and But rather “REST-like” in that they use XML and

HTTP but not the underlying philosophy of RESTHTTP but not the underlying philosophy of REST

Underlying philosophy of mapping HTTP Underlying philosophy of mapping HTTP verbs to the Create/Retrieve/Update/Delete verbs to the Create/Retrieve/Update/Delete philosophy of APIsphilosophy of APIs Discussed in a PhD thesis by Discussed in a PhD thesis by Roy FieldingRoy Fielding

Page 5: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

True RESTTrue REST

URLs are nouns, not verbsURLs are nouns, not verbs

The basic API (verbs) is C.R.U.DThe basic API (verbs) is C.R.U.D Create (HTTP POST)Create (HTTP POST) Retrieve (HTTP GET) Retrieve (HTTP GET) [no side effects][no side effects] Update (HTTP PUT)Update (HTTP PUT) Delete (HTTP DELETE)Delete (HTTP DELETE)

Page 6: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

SRU – REST styleSRU – REST style

Noun: http://www.server/database/myResultSetNoun: http://www.server/database/myResultSet

Verbs:Verbs:Search – create result setSearch – create result setPOST /database/myResultSet HTTP/1.1POST /database/myResultSet HTTP/1.1Content-Type: text/xml; charset=utf-8Content-Type: text/xml; charset=utf-8<query>title = fish</query><query>title = fish</query>

Sort – update result setSort – update result setPUT /database/myResultSet HTTP/1.1PUT /database/myResultSet HTTP/1.1Content-Type: text/xml; charset=utf-8Content-Type: text/xml; charset=utf-8<sortBy>author</sortBy><sortBy>author</sortBy>

Retrieve – retrieve result setRetrieve – retrieve result setGET /database/myResultSet HTTP/1.1GET /database/myResultSet HTTP/1.1Content-Type: text/xml; charset=utf-8Content-Type: text/xml; charset=utf-8<recordSet><startRecord>1</startRecord><endRecord>10</endRecord></recordSet><recordSet><startRecord>1</startRecord><endRecord>10</endRecord></recordSet>

Finish – delete result setFinish – delete result setDELETE /database/myResultSet HTTP/1.1DELETE /database/myResultSet HTTP/1.1Content-Type: text/xml; charset=utf-8Content-Type: text/xml; charset=utf-8

Page 7: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

SOAPSOAP Originally Simple Object Access Protocol Originally Simple Object Access Protocol

but now SOAP stands for SOAP!but now SOAP stands for SOAP! (Called XP for XML Protocol for a while)(Called XP for XML Protocol for a while)

Originates from doing Remote Procedural Originates from doing Remote Procedural Calls over XML and HTTPCalls over XML and HTTP

Microsoft initiated but moved to W3CMicrosoft initiated but moved to W3C

Originally a number of competitorsOriginally a number of competitors XML-RPC etc…XML-RPC etc…

Page 8: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Remote Procedural StyleRemote Procedural Style

……myVar = foo(“hello world”, 6)myVar = foo(“hello world”, 6)

String foo(String s, Integer i) {String foo(String s, Integer i) {……

return result;return result;}}

Page 9: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Remote Procedural StyleRemote Procedural Style

……myVar = foo(“hello world”, 6)myVar = foo(“hello world”, 6)

String foo(String s, Integer i) {String foo(String s, Integer i) {……

return result;return result;}}

LANLAN

Page 10: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Remote Procedural StyleRemote Procedural Style

……myVar = foo(“hello world”, 6)myVar = foo(“hello world”, 6)

String foo(String s, Integer i) {String foo(String s, Integer i) {……

return result;return result;}}

InternetInternet

Page 11: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

More SOAPMore SOAP<SOAP:Envelope xmlns:SOAP=“..."><SOAP:Envelope xmlns:SOAP=“..."> <SOAP:Header> …<SOAP:Header> … </SOAP:Header></SOAP:Header>

<SOAP:Body> <SOAP:Body>

<SRW:searchRetrieveRequest xmlns:SRW=“..."><SRW:searchRetrieveRequest xmlns:SRW=“..."> <SRW:version>1.1</SRW:version><SRW:version>1.1</SRW:version> <SRW:query>(dc.author exact "jones" and dc.title >= <SRW:query>(dc.author exact "jones" and dc.title >= "smith")</SRW:query>"smith")</SRW:query> <SRW:startRecord>1</SRW:startRecord><SRW:startRecord>1</SRW:startRecord> <SRW:maximumRecords>10</SRW:maximumRecords><SRW:maximumRecords>10</SRW:maximumRecords> <SRW:recordSchema>info:.../mods</SRW:recordsSchema><SRW:recordSchema>info:.../mods</SRW:recordsSchema> </SRW:searchRetrieveRequest></SRW:searchRetrieveRequest>

</SOAP:Body></SOAP:Body></SOAP:Envelope></SOAP:Envelope>

Page 12: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

SOAP ComponentsSOAP Components SOAP:HeaderSOAP:Header

Not well used, but designed for messaging and Not well used, but designed for messaging and relaying purposesrelaying purposes

e.g. telling proxies to rewrite sru:baseUrle.g. telling proxies to rewrite sru:baseUrl

SOAP:BodySOAP:Body XML payloadXML payload

SOAP:FaultsSOAP:Faults Error conditionsError conditions

Page 13: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

WSDL 1.1WSDL 1.1 Web Service Description LanguageWeb Service Description Language

Describes the SOAP MessagesDescribes the SOAP Messages

ComponentsComponents TypesTypes

XML representations of the types (typically XML Schema XML representations of the types (typically XML Schema language)language)

e.g. searchRetrieveRequestTypee.g. searchRetrieveRequestType MessagesMessages

XML messages built from types passed from client to server and XML messages built from types passed from client to server and server to clientserver to client

e.g. searchRetrieveRequest, searchRetrieveResponsee.g. searchRetrieveRequest, searchRetrieveResponse portTypesportTypes

Which messages are sent in which direction, and what the Which messages are sent in which direction, and what the response isresponse is

e.g. searchRetrieveRequest is sent client to server, and a e.g. searchRetrieveRequest is sent client to server, and a searchRetrieveResponse sent backsearchRetrieveResponse sent back

BindingsBindings How to encode (e.g. SOAP document/literal)How to encode (e.g. SOAP document/literal) How to transport (e.g. HTTP, SMTP)How to transport (e.g. HTTP, SMTP)

ServicesServices EndpointEndpoint e.g. http://voyager.loc.gov:7090/e.g. http://voyager.loc.gov:7090/

Page 14: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Invisible WSDLInvisible WSDL

String foo(String s, Integer i)String foo(String s, Integer i){…}{…}

……myVar = foo(“hello world”, 6)myVar = foo(“hello world”, 6)……

WSDL Document

WSDL Document

Page 15: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Not so invisible WSDLNot so invisible WSDL

WSDL not well defined/describedWSDL not well defined/described The original spec uses definition by exampleThe original spec uses definition by example

Early WSDL tools highly incompatibleEarly WSDL tools highly incompatible Different interpretations Different interpretations e.g. when to use xsd:import; when to use e.g. when to use xsd:import; when to use

wsdl:importwsdl:import

Not so bad today (if using the major Not so bad today (if using the major toolkits)toolkits)

Page 16: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Early SOAP/WSDL Toolkits Early SOAP/WSDL Toolkits IssuesIssues

SOAP Encoding 1SOAP Encoding 1 rpc versus documentrpc versus document

RPC Style:RPC Style:

String foo(String s, Integer i)String foo(String s, Integer i)

Document StyleDocument Style

Class foo {Class foo {String s;String s;

Integer I;Integer I;

}}

String foobar(foo);String foobar(foo);

Page 17: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

SOAP Encoding 2 – SOAP Encoding 2 – SOAP versus Literal stylesSOAP versus Literal styles

Literal – just as plain XMLLiteral – just as plain XML<stuff>hello</stuff><stuff>hello</stuff><numbers"><numbers">

  <item>10</item>  <item>10</item>  <item>20</item>  <item>20</item>  <item>30</item>  <item>30</item>  <item>40</item>  <item>40</item>  <item>50</item>  <item>50</item>

</numbers></numbers>

SOAP – use particular SOAP defined XML constructs for arrays SOAP – use particular SOAP defined XML constructs for arrays etc.etc.<stuff xsi:type=“xsd:string”>hello</stuff><stuff xsi:type=“xsd:string”>hello</stuff><numbers xsi:type="SOAP-ENC:Array" SOAP-<numbers xsi:type="SOAP-ENC:Array" SOAP-

ENC:arrayType="xsd:integer[5]">ENC:arrayType="xsd:integer[5]">  <item>10</item>  <item>10</item>  <item>20</item>  <item>20</item>  <item>30</item>  <item>30</item>  <item>40</item>  <item>40</item>  <item>50</item>  <item>50</item>

</numbers></numbers>

Page 18: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

And it gets worseAnd it gets worse

Literal:Literal:<Distance><Distance> <p1> <p1> <x>10</x> <x>10</x> <y>20</y> <y>20</y> </p1> </p1> <p2> <p2> <x>10</x> <x>10</x> <y>20</y> <y>20</y> </p2> </p2> <Distance><Distance>

SOAP Encoding:SOAP Encoding:<Distance> <Distance> <p1 HREF="#id1"/> <p1 HREF="#id1"/> <p2 HREF="#id1"/> <p2 HREF="#id1"/> </Distance> </Distance> <Point id="id1"> <Point id="id1"> <x>10</x> <x>10</x> <y>20</y> <y>20</y> </Point></Point>

Page 19: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

XML SchemaXML Schema

Officially any XML Schema construct Officially any XML Schema construct is valid in WSDLis valid in WSDL

In practice…In practice… e.g. for a long time Java tools were e.g. for a long time Java tools were

defined by JAX-RPC which defined a defined by JAX-RPC which defined a subset of valid XML Schemasubset of valid XML Schema

e.g. in early stages of SRU the following e.g. in early stages of SRU the following caused headaches:caused headaches: xsd:positiveInteger, xsd:nonNegativeInteger xsd:positiveInteger, xsd:nonNegativeInteger

etc.etc.

Page 20: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

XML Schema funniesXML Schema funniessequences and choicesequences and choice

<sequence><sequence><element name=“foo” type=“string” /><element name=“foo” type=“string” /><element name=“bar” type=“string” /><element name=“bar” type=“string” />

</sequence></sequence>

Often generates Often generates String foo;String foo; String bar;String bar;

<choice><choice><element name=“foo” type=“string” /><element name=“foo” type=“string” /><element name=“bar” type=“string” /><element name=“bar” type=“string” />

</choice></choice>

Also generatesAlso generates String foo;String foo; String bar;String bar;

(Although will raise an exception if both are non-null at serialization)(Although will raise an exception if both are non-null at serialization)

Page 21: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

ConsiderConsider<choice><choice>

<element name=“foo” type=“string” /><element name=“foo” type=“string” /><sequence><sequence> <element name=“foo” type=“string” /><element name=“foo” type=“string” /> <element name=“bar” type=“string” /><element name=“bar” type=“string” /></sequence></sequence>

</choice></choice>

Early Axis (until 2005!) generated Early Axis (until 2005!) generated String foo;String foo; String foo;String foo; String bar;String bar;

Page 22: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

XML Schema funnies:XML Schema funnies:Extension of all groupsExtension of all groups

<complexType=“type1”><complexType=“type1”> <complexContent><complexContent> <all><all>

<element name=“foo” type=“string” /><element name=“foo” type=“string” /> <element name=“bar” type=“string” /><element name=“bar” type=“string” />

<all><all> </complexContent></complexContent></complexType></complexType>

<complexType=“type2”><complexType=“type2”> <complexContent><complexContent> <extension base=“type2"><extension base=“type2"> <all><all>

<element name=“foo1” type=“string” /><element name=“foo1” type=“string” /> <element name=“bar2” type=“string” /><element name=“bar2” type=“string” />

<all><all> </extension></extension> </complexContent></complexContent></complexType></complexType>

Passes most XML parsers – but is invalid!Passes most XML parsers – but is invalid!

Page 23: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

XML Schema funnies: XML Schema funnies: Qualified Dublin Core caseQualified Dublin Core case

Health warning – complex XML Schema follows!!!Health warning – complex XML Schema follows!!!<xs:complexType name="SimpleLiteral"> <xs:complexType name="SimpleLiteral"> <xs:complexContent mixed="true"><xs:complexContent mixed="true"> <xs:restriction base="xs:anyType"> <xs:restriction base="xs:anyType"> <xs:sequence> <xs:sequence> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/> <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>

</xs:sequence> </xs:sequence> <xs:attribute ref="xml:lang" use="optional"/> <xs:attribute ref="xml:lang" use="optional"/> </xs:restriction> </xs:restriction> </xs:complexContent> </xs:complexContent> </xs:complexType></xs:complexType>

<xs:complexType name="W3CDTF"> <xs:complexType name="W3CDTF"> <xs:simpleContent> <xs:simpleContent> <xs:restriction base="dc:SimpleLiteral"> <xs:restriction base="dc:SimpleLiteral"> <xs:simpleType> <xs:simpleType> <xs:union memberTypes="xs:gYear xs:gYearMonth xs:date xs:dateTime"/> <xs:union memberTypes="xs:gYear xs:gYearMonth xs:date xs:dateTime"/> </xs:simpleType> </xs:simpleType> </xs:restriction> </xs:restriction> </xs:simpleContent> </xs:simpleContent> </xs:complexType></xs:complexType>

Valid but will not get past many parsersValid but will not get past many parsers

Page 24: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Enter WS-IEnter WS-I

Web Service Interoperability profileWeb Service Interoperability profile Key components: SOAP, WSDL, UDDIKey components: SOAP, WSDL, UDDI

Defines a set of rules for Defines a set of rules for interoperable WebServicesinteroperable WebServices e.g. use SOAP document/literal stylee.g. use SOAP document/literal style Rules for wsdl:import versus xsd:importRules for wsdl:import versus xsd:import Still defines any XML Schema as valid Still defines any XML Schema as valid

etc.etc. Compliant toolsets much better at Compliant toolsets much better at

interoperating todayinteroperating today

Page 25: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

UDDI UDDI (the oft forgotten third part (the oft forgotten third part

of WS-I)of WS-I) Universal Description, Discovery and Integration Universal Description, Discovery and Integration

(of WebServices)(of WebServices) Provides a model of organisations and webservicesProvides a model of organisations and webservices Provides a WebService API for interacting with Provides a WebService API for interacting with

registries of WebServicesregistries of WebServices publishing,publishing, searching, searching, retrieving, retrieving, replicating, replicating, subscribingsubscribing

Template based searching (still issues to be Template based searching (still issues to be resolved)resolved)

Not well used outside of enterprise due to out of Not well used outside of enterprise due to out of band contractual negotiations needed for inter-band contractual negotiations needed for inter-enterprise web servicesenterprise web services

Poor open source implementations for version 3.0Poor open source implementations for version 3.0

Page 26: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

And the restAnd the rest WSDL 2.0WSDL 2.0 WS-Addressing: indirection via server EPR (End WS-Addressing: indirection via server EPR (End

Point References)Point References) WS-N, WS-Events, WS-Evening: Notification WS-N, WS-Events, WS-Evening: Notification

publish/subscribepublish/subscribe BPEL: WebService Workflow/ChoreographyBPEL: WebService Workflow/Choreography WSRF: Representing resources through WSRF: Representing resources through

WebServicesWebServices WS-Security: SAML, XACML, etc. for encryption, WS-Security: SAML, XACML, etc. for encryption,

signing/validation and credential delegationsigning/validation and credential delegation ebXML-BP, OWL-S, Semantic Framework etc. for ebXML-BP, OWL-S, Semantic Framework etc. for

policy/contractural negotiationspolicy/contractural negotiations etc…etc…

Compatibility declines as you go further up the Compatibility declines as you go further up the stack… stack… Straying from WS-I can be dangerousStraying from WS-I can be dangerous

Page 27: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

And finally retro-fittingAnd finally retro-fitting

Service Oriented Architecture Service Oriented Architecture Reference ModelReference Model Attempting to retro fit a definition onto Attempting to retro fit a definition onto

SOASOA

Service Oriented Architecture Service Oriented Architecture BlueprintsBlueprints Attempting to retro fit a methodologyAttempting to retro fit a methodology

Page 28: WSDL, UDDI, SOAP, REST: SOA Acronym Soup Matthew J. Dovey Oxford University.

Last wordLast word

Interoperability of WebServices have Interoperability of WebServices have been a difficult roadbeen a difficult road

For more complex tasks (security, For more complex tasks (security, messaging, asynchronous etc.) there messaging, asynchronous etc.) there is still some difficulties aheadis still some difficulties ahead

But we do have interoperability at But we do have interoperability at the basic level and it is getting the basic level and it is getting betterbetter