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 to be expected in a draft Some schemas missing a multi-value property John Doe Jane Doe
Survey Current syllabus for week 10 Media SMIL Synchronized Media Integration Language WML Wireless Markup Language Alternative XSLT 2.0 XPath 2.0
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 Must build site-specific client “screen scraping” Must deal with site-to-site heterogeneity Classic example FedEx site offers package tracking What if you have 100 packages? What if you have 10 different shippers?
Semantic Web “The web for softbots” do for applications what the web does for people
Requirements What do we need we need to be able to find and invoke applications we need to understand the results of such invocations
Solutions How to find and invoke distributed services web services How to understand results intelligible meta-data shared ontologies
Web services
Family of standards UDDI Universal Description, Discovery and Integration how do I create a catalog where services can be found? WSDL Web Services Definition Language how do I describe a service to its users? SOAP Simple Object Access Protocol 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 portType element one-way service receives a message; single input element request-response service receives a message and sends a response; one input and one output element solicit-response service sends a message and receives a response; one output and one input element notification service sends a message; single output element
Example Google WSDL
SOAP Messaging
Envelope Embedded Information Namespaces Encoding information Header Optional Can be handled by intermediaries Body Mandatory Handled only by ultimate receiver
Header Used for extension Context Authentication Transaction Management Made of Header blocks
Body Made of Body blocks Carry main end-to-end information 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 { GoogleSearch search = new GoogleSearch(); search.setKey (“ " ); search.setQueryString(args[0]); search.setSafeSearch(true); GoogleSearchResult result = search.doSearch(); System.out.println(result.toString()); } catch(Exception e) { e.printStackTrace();} }}
Where’s the XML? XML is under the hood It permits the interoperation but the programmer can forget about it Tools do the work VB.Net JAXB
Break
Semantic Web Layers RDF Resource Description Framework RDF Schema OWL Web Ontology Language
Differences RDF Assert facts The ECT 360 homepage is... RDF Schema Create vocabularies and use them ECT 360 is a CTICourse OWL Describe relationships between vocabularies CTICourse in CTISchema is the same as Class in UICSchema
Semantic Web Idea Question What courses at UIC cover the same material as ECT 360 at DePaul CTI? With the Semantic Web Get description of ECT 360 Crawl UIC site for descriptions of courses Match UIC descriptions against ECT 360 descriptions
Metadata Information about other data: web page Author, timestamp, content-type. photograph Photographer, subject, timestamp, camera model, film used. astronomical observation 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 create an XML document with this information link somehow from web page
Problem What schema do we use? our own? create a consortium of reviewers? This is a general problem of metadata better to have a general solution
The metadata idea Let authors make assertions about their documents Standardize the format but not the content Should build on web technologies
RDF Building Blocks Resource Something with a URI Property Special type of resource With a name Can also have properties Statement Resource / Property / Value triple Statements may refer to the same resource
Example Statements this review is about a book isbn 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 DuCharme that person has a homepage
Example
Resources
Defined by URI Not necessarily a URL Like namespaces
Literals
Properties
Can be a literal or a resources Multiple values allowed Properties can have properties Sam owns shares in Enron The quantity of this ownership relation is 1000 Properties also have URIs Typically a base URI with associated prefix like namespaces
Example: Dublin core Metadata for “published things” Created by a library science consortium Defines elements creator publisher isbn date format
Dublin Core Refer to the Dublin Core namespace in RDF document dc: typical prefix
Triples SubjectPropertyObject dc:titleXSLT Quickly urn:isbn: dc:creatorhttp://example.com/author/0042 foaf:surnameDuCharme
XML Serialization <rdf:RDF xmlns:foaf=" xmlns:dc=" xmlns:rdf=" xmlns:rev=" <rdf:Description rdf:about=”urn:isbn: ” XSLT Quickly Manning Bob DuCharme
With RDF We create assertions triples Vocabulary creation based on namespaces Verbose Low-level
RDF Application: RSS RSS RDF Site Summary used to propagate web content IE Channels Netscape My Navigator blogs Example
Semantic Web Important vision for the future Some tools available now
Next week