xml for interoperability

49
XML for Interoperabilit y Robin Burke ECT 360

Upload: carol-york

Post on 01-Jan-2016

38 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

XML for Interoperability

Robin Burke

ECT 360

Outline

Schemas Survey: last week The Semantic Web Web services SOAP RDF

Schemas

Some schemas not very detailedto 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 10Media

• SMIL• Synchronized Media Integration Language

• WML• Wireless Markup Language

AlternativeXSLT 2.0XPath 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 needwe need to be able to find and invoke

applicationswe need to understand the results of

such invocations

Solutions

How to find and invoke distributed servicesweb services

How to understand resultsintelligible meta-datashared ontologies

Web services

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 extensionContextAuthenticationTransactionManagement

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(“1234123412341234"); 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

RDFResource 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

QuestionWhat courses at UIC cover the same

material as ECT 360 at DePaul CTI? With the Semantic Web

Get description of ECT 360Crawl UIC site for descriptions of

coursesMatch 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 metadatabetter to have a general solution

The metadata idea

Let authors make assertions about their documents

Standardize the formatbut 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

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 DuCharme that person has a homepage

Example

Resources

Resources

Defined by URINot necessarily a URLLike namespaces

Literals

Properties

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 namespacein RDF documentdc: typical prefix

Triples

Subject Property Object

http://example.com/rev1 rev:subject urn:isbn:1930110111

urn:isbn:1930110111 dc:title XSLT Quickly

urn:isbn:1930110111 dc:creator http://example.com/author/0042

http://example.com/author/0042 foaf:surname DuCharme

http://example.com/author/0042 foaf:homepage http://www.snee.com/bob/

http://example.com/author/0042 foaf:pastProject 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.w3.org/1999/02/22-rdf-syntax-ns#“ xmlns:rev="http://amk.ca/xml/review/1.0#"> <rev:Review rdf:about="http://example.com/rev1"> <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:firstName>Bob</FOAF:firstName> <foaf:homepage rdf:resource="http://www.snee.com/bob/"/> <foaf:pastProject rdf:resource="urn:isbn:1930110111"/> <foaf:surname>DuCharme</FOAF:surname> </rdf:Description> </rdf:RDF>

With RDF

We create assertionstriples

Vocabulary creation based on namespaces

Verbose Low-level

RDF Application: RSS

RSSRDF Site Summaryused to propagate web content

• IE Channels• Netscape My Navigator• blogs

Example

Semantic Web

Important vision for the future Some tools available now

Next week