XML for Interoperability Robin Burke ECT 360 Outline
XML for Interoperability Robin Burke ECT 360
Outline Schemas ¢ Survey: last week ¢ The Semantic Web ¢ Web services ¢ SOAP ¢ RDF ¢
Schemas ¢ Some schemas not very detailed l ¢ to be expected in a draft Some schemas missing a multi-value property <author-list> <author>John Doe</author> <author>Jane Doe</author> </author-list>
Survey ¢ Current syllabus for week 10 l Media • SMIL • Synchronized Media Integration Language • WML • Wireless Markup Language ¢ Alternative XSLT 2. 0 l XPath 2. 0 l
What the web is good at ¢ ¢ Presenting information to people Allowing people access to a wide range of information services
What the web is not good at ¢ Application integration l Must build site-specific client • “screen scraping” l ¢ Must deal with site-to-site heterogeneity Classic example l l l Fed. Ex site offers package tracking What if you have 100 packages? What if you have 10 different shippers?
Semantic Web ¢ “The web for softbots” l do for applications what the web does for people
Requirements ¢ What do we need to be able to find and invoke applications l we need to understand the results of such invocations l
Solutions ¢ How to find and invoke distributed services l ¢ web services How to understand results intelligible meta-data l shared ontologies l
Web services
Web services ¢ ¢ Family of standards UDDI l Universal Description, Discovery and Integration l how do I create a catalog where services can be found? WSDL l Web Services Definition Language l how do I describe a service to its users? SOAP l Simple Object Access Protocol l how do I communicate with the service
WSDL message(s) accepted and emitted: abstract description (XML Schema) ¢ network protocol(s) and message format(s) ¢ operation: exchange of messages ¢ port type: collection of operations ¢ port: implementation of a port type ¢ service: collection of ports ¢
UDDI registry system ¢ business entities, business services, specifications, service types ¢ standard taxonomies to describe businesses, services, and service types ¢
SOAP ¢ ¢ ¢ message construction (envelope, header, body) message exchange patterns (MEP) and how to define more processing model for messaging: originator, intermediaries, destination extensibility mechanism fault system bindings to transport protocols (HTTP, SMTP, . . . )
Operation patterns ¢ ¢ ¢ port. Type element one-way l service receives a message; single input element request-response l service receives a message and sends a response; one input and one output element solicit-response l service sends a message and receives a response; one output and one input element notification l service sends a message; single output element
Example ¢ Google WSDL
SOAP Messaging
Envelope ¢ Embedded Information l l ¢ Header l l ¢ Namespaces Encoding information Optional Can be handled by intermediaries Body l l Mandatory Handled only by ultimate receiver
Header ¢ Used for extension Context l Authentication l Transaction l Management l ¢ Made of Header blocks
Body Made of Body blocks ¢ Carry main end-to-end information ¢ l Application data that will be consumed by Ultimate SOAP receiver RPC method and parameters ¢ SOAP fault ¢
Example SOAP message ¢ Google query ¢
Example ¢ Google response
Running code import com. google. soap. search. *; public class Test { public static void main(String[] args) { try { Google. Search search = new Google. Search(); search. set. Key(“ 12341234" ); search. set. Query. String(args[0]); search. set. Safe. Search(true); Google. Search. Result result = search. do. Search(); System. out. println(result. to. String()); } catch(Exception e) { e. print. Stack. Trace(); } }}
Where’s the XML? XML is under the hood ¢ It permits the interoperation ¢ l ¢ but the programmer can forget about it Tools do the work VB. Net l JAXB l
Break
Semantic Web Layers ¢ RDF l Resource Description Framework RDF Schema ¢ OWL ¢ l Web Ontology Language
Differences ¢ RDF l l ¢ RDF Schema l l ¢ Assert facts The ECT 360 homepage is. . . Create vocabularies and use them ECT 360 is a CTICourse OWL l l Describe relationships between vocabularies CTICourse in CTISchema is the same as Class in UICSchema
Semantic Web Idea ¢ Question l ¢ What courses at UIC cover the same material as ECT 360 at De. Paul CTI? With the Semantic Web Get description of ECT 360 l Crawl UIC site for descriptions of courses l Match UIC descriptions against ECT 360 descriptions l
Metadata ¢ ¢ Information about other data: web page l ¢ photograph l ¢ Author, timestamp, content-type. Photographer, subject, timestamp, camera model, film used. astronomical observation l date/time, coordinates, instrument, part of the instrument.
RDF ¢ RDF is a specification that defines a model for representing the world, and a syntax for serializing and exchanging that model.
Example: Book reviews ¢ ¢ ¢ Some web pages are reviews of something else: a book, a recording, another web page. The item being reviewed has various properties: a title, an author, an ISBN (for books, at least). Possibility l l create an XML document with this information link somehow from web page
Problem ¢ What schema do we use? our own? l create a consortium of reviewers? l ¢ This is a general problem of metadata l better to have a general solution
The metadata idea Let authors make assertions about their documents ¢ Standardize the format ¢ l ¢ but not the content Should build on web technologies
RDF Building Blocks ¢ Resource l ¢ Property l l l ¢ Special type of resource With a name Can also have properties Statement l ¢ Something with a URI Resource / Property / Value triple Statements may refer to the same resource
Example ¢ Statements l l l l this review is about a book isbn 01930110111 this book is published by Manning this book is titled “XSLT Quickly” this book was written by a person that person has first name Bob that person has last name Du. Charme that person has a homepage
Example
Resources
Resources ¢ Defined by URI Not necessarily a URL l Like namespaces l
Literals
Properties
Properties ¢ ¢ ¢ Can be a literal or a resources Multiple values allowed Properties can have properties l l ¢ Sam owns shares in Enron The quantity of this ownership relation is 1000 Properties also have URIs l l Typically a base URI with associated prefix like namespaces
Example: Dublin core ¢ Metadata for “published things” l ¢ Created by a library science consortium Defines elements l l l creator publisher isbn date format
Dublin Core ¢ Refer to the Dublin Core namespace in RDF document l dc: typical prefix l
Triples Subject Property Object http: //example. com/rev 1 rev: subject urn: isbn: 1930110111 dc: title XSLT Quickly urn: isbn: 1930110111 dc: creator http: //example. com/author/0042 foaf: surname Du. Charme http: //example. com/author/0042 foaf: homepage http: //www. snee. com/bob/ http: //example. com/author/0042 foaf: past. Project urn: isbn: 1930110111
XML Serialization <rdf: RDF xmlns: foaf="http: //xmlns. com/foaf/0. 1/“ xmlns: dc="http: //purl. org/dc/elements/1. 1/“ xmlns: rdf="http: //www. w 3. org/1999/02/22 -rdf-syntax-ns#“ xmlns: rev="http: //amk. ca/xml/review/1. 0#"> <rev: Review rdf: about="http: //example. com/rev 1"> <rev: subject rdf: resource="urn: isbn: 1930110111"/> </rev: Review> <rdf: Description rdf: about=”urn: isbn: 1930110111” <dc: title>XSLT Quickly</dc: title> <dc: creator rdf: resource=“http: //example. com/auth/0042”/> <dc: publisher>Manning</dc: publisher> </rdf: Description> <rdf: Description rdf: about="http: //example. com/auth/0042"> <foaf: first. Name>Bob</FOAF: first. Name> <foaf: homepage rdf: resource="http: //www. snee. com/bob/"/> <foaf: past. Project rdf: resource="urn: isbn: 1930110111"/> <foaf: surname>Du. Charme</FOAF: surname> </rdf: Description> </rdf: RDF>
With RDF ¢ We create assertions l triples Vocabulary creation based on namespaces ¢ Verbose ¢ Low-level ¢
RDF Application: RSS ¢ RSS RDF Site Summary l used to propagate web content l • IE Channels • Netscape My Navigator • blogs ¢ Example
Semantic Web Important vision for the future ¢ Some tools available now ¢
Next week
- Slides: 49