About W3C
- International consortium, around 430 Members, started by Tim Berners-Lee, inventor of the Web, in 1995
- Standardization of core Web technologies, publication of guidelines, etc.
- Web Services work started in 2001
- Semantic Web Activity
Web Services
Web Services Challenges
- Interoperability
- Integration
- Extensibility
- Scalability
- ...
Follow-up on work from ebXML, Corba...
… translating to an architecture
… justifying some choices:
- XML-based messages
- for platform-independent machine processing
- Framework focused on extensibility
- facilitating interoperability
- Machine-processable descriptions
- facilitating integration
- Loose coupling
- maximizing scalability
Web Services Work Items
- Web Services Protocol
Core Protocol
- Messaging Framework: SOAP 1.2
- Web Services Addressing 1.0
- Message Transmission Optimization Mechanism: XOP/MTOM
Protocol extension
- Resource Representation SOAP Header Block
- Web Services Description
- Web Services Description: WSDL 2.0
- Web Services Policy: WS-Policy 1.5
- Web Services Choreography Description: WS-CDL 1.0
- XML Schema Patterns for Databinding
- Semantic Annotations for WSDL
Messaging Framework
SOAP 1.2:
- basic XML Framework for exchanging structured and typed
information in machine-to-machine interaction
- necessitate the use of a transport protocol, such as
HTTP/1.1
- improved interoperability, processing model, and protocol
independence since SOAP 1.1
- already deployed in all major toolkits and several Web services
extensions
W3C Recommendation since June 2003. Slow but steady transition.
SOAP Version 1.2
- Core of the messaging framework
- Defines:
- An envelope
- A processing model
- A binding framework
SOAP message
- XML document
- Represented abstractly as an XML Infoset
SOAP message path
- One-way message
- Going from a sender to a receiver, possible via intermediaries
- SOAP body is for the ultimate recipient
- SOAP header blocks may be targeted at anybody along the message
path
Example of a SOAP message
<?xml version='1.0' ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<m:reservation xmlns:m="http://travelcompany.example.org/reservation"
env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
env:mustUnderstand="true">
<m:reference>uuid:093a2da1-q345-739r-ba5d-pqff98fe8j7d</m:reference>
<m:dateAndTime>2001-11-29T13:20:00.000-05:00</m:dateAndTime>
</m:reservation>
</env:Header>
<env:Body>
<p:itinerary
xmlns:p="http://travelcompany.example.org/reservation/travel">
…
</p:itinerary>
</env:Body>
</env:Envelope>
Message exchange patterns
- One-way exchanges can be combined
- Template that establishes a pattern for the exchange of messages
between SOAP nodes
- Examples:
- Request response
- Response: SOAP message following a non-SOAP request
Underlying protocols binding
- Need to carry the XML document that a SOAP message is
- Duty of a binding to an underlying protocol:
- Serialization of the Infoset
- Transmission
- Reconstruction of the Infoset
- Can implements features:
- Message exchange pattern (MEP)
- Optimization
- …
SOAP 1.2 HTTP Binding
- Carries SOAP messages in an HTTP message
- Implements 2 MEPs
- SOAP Request-Response: HTTP POST
- SOAP Response: HTTP GET
- Implements the SOAP Web Method feature:
- Allows for REST-ful interactions
Addressing information: Web Services Addressing 1.0
- SOAP is very generic: no addressing information provided in its core
capabilities
- Typical interaction: HTTP request-response
- Other scenarios:
- protocol without appropriate addressing capabilities
- protocol which doesn't provide correlation facilities
- send the response to an alternate location
Addressing from and to endpoints
- Messages travel between endpoints
- Concept of an endpoint reference (EPR):
- destination address
- reference parameters: bag of information related to an
interaction
- metadata about the endpoint
Addressing information: Web Services Addressing 1.0
- SOAP is very generic: no addressing information provided in its core
capabilities
- Typical interaction: HTTP request-response
- Other scenarios:
- protocol without appropriate addressing capabilities
- protocol which doesn't provide correlation facilities
- send the response to an alternate location
Addressing from and to endpoints
- Messages travel between endpoints
- Concept of an endpoint reference (EPR):
- destination address
- reference parameters: bag of information related to an
interaction
- metadata about the endpoint
Addressing
Web Services Addressing 1.0:
- defines service endpoint references
- directs messages to the service endpoints, including replies
or faults.
- relates messages using URIs
W3C Recommendation (Core and SOAP Binding)
WSDL Binding interoperability ongoing
Handling non-XML data
- SOAP messages are XML documents
- What to do with legacy binary data?
- Bitmap images (e.g. PNG)
- Other document binary formats (e.g. PDF)
- Need to be part of the SOAP envelope to benefit from the SOAP
processing model
- Solution: include Base64-encoded data of type
xs:base64Binary
in the SOAP envelope
XOP & MTOM
W3C Recommendation since January 2005.
Resource Representation SOAP Header Block
- Associates a URI with some Base64 encoded data
- Allow to carry a representation of a Web resource
- Internet media type can be expressed: Describing
Media Content of Binary Data in XML
- Useful for receivers that have limited connectivity
RRSHB example
<soap:Envelope
xmlns:soap='http://www.w3.org/2003/05/soap-envelope'
xmlns:rep='http://www.w3.org/2004/08/representation'
xmlns:xmlmime='http://www.w3.org/2005/05/xmlmime'>
<soap:Header>
<rep:Representation resource='http://example.org/me.jpg'>
<rep:Data
xmlmime:contentType='image/jpeg'>/aWKKapGGyQ=</rep:Data>
</rep:Representation>
</soap:Header>
<soap:Body>
<x:MyData xmlns:x='http://example.org/mystuff'>
<x:name>John Q. Public</x:name>
<x:img src='http://example.org/me.jpg'/>
</x:MyData>
</soap:Body>
</soap:Envelope>
Doing something with this messaging framework
- SOAP+WS-Addressing+MTOM allows complex exchange of rich information
- Message exchange can be enhanced with added processing
But:
- How do you know what messages are accepted by an endpoint?
- How to do things with Web services?
Describing Web services
- Simple tasks are exposed as stand-alone services
- In order to use those services and do useful things:
- Need to describe how to interact with a service: WSDL 2.0
- Need to describe interactions between a set of services: WS-CDL
1.0
- Need to define advanced databinding to XML schemas
- What's next?
WSDL 2.0 Structure
Description document:
<description targetNamespace="…">
Message formats (schema types):
<types> … </types>
Abstract interface of the service:
<interface>
<operation> … </operation>*
</interface>
Binding of these messages to a protocol:
<binding> … </binding>
Location of the service:
<service>
<endpoint> … </endpoint>*
</service>
</description>
New Features in WSDL 2.0
- Reusability: inheritance
- Extensibility: MEPs,
F&P
- Web-friendly: safe operations, complete HTTP/1.1 support
- SOAP 1.2 binding
Message Exchange Patterns (MEPs)
<operation>
specifies logical message
exchange
- MEP defines a pattern of interaction between agents
- sequence
- cardinality
- direction
- Base set of MEPs:
- In-Out, In-Only, Out-In, Out-Only
- Robust-In-Only, Robust-Out-Only (permit optional fault)
- Out-Optional-In, In-Optional-Out (reply is optional)
- Extensible: other MEPs can also be used (identified by URI)
WSDL 2.0
- Reusable definitions: import, include, inheritance, bindings
- Advanced support for SOAP 1.2 and HTTP 1.1
Candidate Recommendation
Interoperability events
At risk: feature/properties, 6 MEPs
WS-Policy 1.5
- Framework for policy assertions:
All
, ExactlyOne
- Attachment mechanisms for policy: UDDI 2.0/3.0, WSDL 1.1/2.0
- Not defining policy assertions
- Not defining policy negotiation
- Currently Working Draft (Nov 2)
- W3C Recommendation by end of 2007
WS-Policy 1.5
<Policy>
<mtom:OptimizedMimeSerialization wsp:Optional="true"/>
<wsap:UsingAddressing />
<ExactlyOne>
<sp:TransportBinding>
<Policy>
<sp:TransportToken>
<Policy>
<sp:HttpsToken RequireClientCertificate="false" />
</Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<Policy>
<sp:Basic256Rsa15/>
</Policy>
</sp:AlgorithmSuite>
</Policy>
</sp:TransportBinding>
<sp:AsymmetricBinding>…</sp:AsymmetricBinding>
</ExactlyOne>
</Policy>
Choreography
WS-CDL 1.0:
Describe interaction among atomic Web Services
- Complex messages exchanges
- Composition of Web Services: linking business via Web
Services
Candidate Recommendation phase
XML Schema Patterns for Databinding
- Provides a set of simple XML Schema 1.0 patterns
- Describe XML representations of commonly used data structures:
Enumeration, Collection, Vector, etc.
Working Draft of XML Schema Patterns for Databinding
XML Schema Patterns example
<xs:complexType name="Collection">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="shade" type="xs:string"/>
<xs:element name="length" type="xs:int"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="inStock" type="xs:int"/>
</xs:complexType>
Describing Web services
- Need to describe how to interact with a service: WSDL 2.0
- Need to describe interactions between a set of services: WS-CDL
1.0
- Need to define advanced databinding to XML schemas
- What's next? Semantics!
Semantics: setting expectations
- Will make people's life easier
- Examples of use:
- Connect two services, ensuring that they speak the same language
with same meaning
- Merge data from different sources (e.g. title &
título)
- Out of a list of 50 existing services, get only the 2 candidates
that actually do what the user wants
- Automatic recovery from failure, etc.
Semantic Web Services
Generic Semantic Annotation mechanism for WSDL
Semantic Annotations Usage
- Registries, Categories
- Defining Annotations to publish a Web Service, e.g. to a UDDI registry
- Adding Categorization information, defining a taxonomy if it does not exist
- Matchmaking and Composing Web services
- Matching Web Service Interfaces using a Shared Ontology
- Matching Web Service Interfaces with Ontology Mediation
- Composing Web Services with/without Ontology Reasoning
- Matching Using Multiple Annotations
- Defining Schema Mappings to enable Web service Invocation
Semantic Annotations example
<xs:element name="CheckInventoryServiceRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="UPC" type="xsd:string"
sawsdl:modelReference="SampleRetailOntology#UPCCode"/>
<wsdl:element name="DeliveryDate" type="xs:string"
sawsdl:modelReference="SampleRetailOntology#DeliveryDate"/>
<wsdl:element name="numBundles" type="xs:float"
sawsdl:modelReference="SampleRetailOntology#NumBundles/>
</xs:sequence>
</xs:complexType>
</xs:element>
<SampleRetailOntology.owl#> rdf:type owl:Ontology .
:PartNumber rdf:type owl:Class;
rdfs:subClassOf owl:Thing;
owl:equivalentClass :UPC .
:UPC rdf:type owl:Class;
owl:equivalentClass :PartNumber .
:NumBundles rdf:type owl:Class;
owl:equivalentClass :Quantity .
:Quantity rdf:type owl:Class;
rdfs:subClassOf owl:Thing;
owl:equivalentClass :NumBundles; .
:DeliveryDate rdf:type owl:Class;
rdfs:subClassOf owl:Thing;
owl:equivalentClass owl:DueDate .
:DueDate rdf:type owl:Class;
owl:equivalentClass :DeliveryDate .
Prospectives/Research
Research activities around WS at W3C
- WS2 IST project (FP6)
- Internationalization (i18n)
- Investigation of "user" domains: Life sciences, Geospatial systems, Grid...
WS2 "SPDL Project" : SPARQL + WSDL Demonstrator
Adding WSDL annotations for SPARQL Queries
- SPARQL: SQL-like RDF query language
SELECT ?title WHERE { ?response tnss:doctitle ?title }
- XPath: identify locations in a document
aws:ItemSearchResponse/aws:Items/aws:Item/aws:Title
- WSDL: associate messages (documents) with services
<definitions><types><element name="ItemSearchResponse"></element></types>...
<message name="ItemSearchResponseMsg"/></definitions>
Ties RDF data to locations in a Web Services message.:
<xs:element name="Item" spat:SPAT='?book tns:doctitle xpath("aws:Title")'/>
Demo
PREFIX tnss: <http://webservices.amazon.com/AWSECommerceService/2004-11-10>
SELECT ?asin ?title WHERE {
?X tnss:id "0FWYBWB91M5S26YBE382" ;
tnss:keywords "cola" ;
tnss:index "Books" ;
tnss:asin ?asin ;
tnss:doctitle ?title }
asin |
title |
"0896584542" | "The Sparkling Story of Coca-Cola" |
"0953984028" | "The World Stormrider Guide (Stormrider Guides)" |
"0887307515" | "Secret Formula" |
"0873493818" | "The Encyclopedia of Pepsi-Cola Collectibles (Encyclopedia of Pepsi-Cola Collectibles)" |
"0896960528" | "The Cola Wars: The story of the global battle between the Coca-Cola Company and PepsiCo, Inc." |
"1887432930" | "Coca-Cola Collectible Santas (Collector's Guide to Coca Cola Items Series)" |
"0977184307" | "Splenda® Is It Safe Or Not?" |
"0873492412" | "Petretti's Coca-Cola Collectibles Price Guide (Petretti's Coca-Cola Collectibles Price Guide)" |
"0553568914" | "Elvis, Jesus and Coca-Cola (Kinky Friedman Novels (Paperback))" |
"0465054684" | "For God, Country, and Coca-Cola: The Definitive History of the Great American Soft Drink and the Company That Makes It" |
Internationalization
- Web Services Internationalization: WS-I18N
- Preferences and configuration information to provide culturally
sensitive or multi-lingual operation
- SOAP and WSDL extensions
<env:Envelope>
<env:Header>
<i18n:international>
<i18n:locale>en-US</i18n:locale>
<i18n:preferences>
<ldml:collation>
<ldml:alias source="de_DE" type="phonebook"/>
</ldml:collation>
</i18n:preferences>
</i18n:international>
…
</env:Header>
<env:Body>
…
</env:Body>
</env:Envelope>
What about the Grid?
- The Grid platform is a user of the Web platform, much like the Web is a user of the Internet.
The Grid needs the Web: HTTP, XML, Web Services, Semantic Web
- The Grid is a technical community that use W3C technologies, among many others technical communities (e.g. Life Science, Mobile, eGoverment, Oil Industry, Airlines, etc.)
W3C Standards and Grid
- The Web Services architecture is still evolving bottom-up style, and the OGSA roadmap assumes
stability at this level.
- W3C works to deliver Open Standards
(technical coordination and leadership, consensus and running code, clear
patent policy, universality, persistence).
- Web services stack and connected work (e.g. Efficient XML Interchange)
- Semantic Web technologies available for Semantic Grid (e.g. SPARQL)
- Semantic Web Services work started
- Various W3C instruments like
Workshop, Working Group, Incubator, Interest Group, that can be used
to host a new standard related activity
Thank you
More information at:
http://www.w3.org/2002/ws/