WSDL Using <import>

Slides:



Advertisements
Similar presentations
EGEE is a project funded by the European Union under contract IST WSDL Web Service Description Language
Advertisements

Best Practices in Web Service Style, Data Binding and Validation (for use in Data-Centric Applications) David Meredith, Asif Akram, Rob Allan CCLRC Daresbury.
Service Description: WSDL COMP6017 Topics on Web Services Dr Nicholas Gibbins –
XML Schema Heewon Lee. Contents 1. Introduction 2. Concepts 3. Example 4. Conclusion.
CSPP51038 WSDL in depth. Advanced Schema features (required for understanding wsdl)
XML: Extensible Markup Language
EGEE is a project funded by the European Union under contract IST WSDL Using
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
EGEE is a project funded by the European Union under contract IST WSDL Web Service Description Language 3 – 4 June
EGEE is a project funded by the European Union under contract IST Introduction to Web Services 17 th October
EGEE is a project funded by the European Union under contract IST Introduction to Web Services David Fergusson NeSC 20 th July
XML Schemas Lecture 10, 07/10/02. Acknowledgements A great portion of this presentation has been borrowed from Roger Costello’s excellent presentation.
EGEE is a project funded by the European Union under contract IST Introduction to Web Services 20 th July
Manohar – Why XML is Required Problem: We want to save the data and retrieve it further or to transfer over the network. This.
17 Apr 2002 XML Schema Andy Clark. What is it? A grammar definition language – Like DTDs but better Uses XML syntax – Defined by W3C Primary features.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
WSDL Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Schemas Ellen Pearlman Eileen Mullin Programming the Web Using XML.
WEB SERVICE DESCRIPTION LANGUAGE ( WSDL) -SIVA SAGAR TELLA.
 XML is designed to describe data and to focus on what data is. HTML is designed to display data and to focus on how data looks.  XML is created to structure,
Session IV Chapter 9 – XML Schemas
Of 33 lecture 3: xml and xml schema. of 33 XML, RDF, RDF Schema overview XML – simple introduction and XML Schema RDF – basics, language RDF Schema –
Beginning XML 4th Edition. Chapter 5: XML Schemas.
New Perspectives on XML, 2nd Edition
An OO schema language for XML SOX W3C Note 30 July 1999.
XML – Part III. The Element … This type of element either has the element content or the mixed content (child element and data) The attributes of the.
XML Introduction. What is XML? XML stands for eXtensible Markup Language XML stands for eXtensible Markup Language XML is a markup language much like.
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
XML 2nd EDITION Tutorial 4 Working With Schemas. XP Schemas A schema is an XML document that defines the content and structure of one or more XML documents.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
Tutorial 13 Validating Documents with Schemas
Processing of structured documents Spring 2003, Part 3 Helena Ahonen-Myka.
EGEE is a project funded by the European Union under contract IST XML Schema 3 – 4 June
XML Schema Definition (XSD). Definition of a Schema It is a model for describing the structure and content of data The XML Schema was developed as a content.
XML Validation II Advanced DTDs + Schemas Robin Burke ECT 360.
Lecture 0 W3C XML Schema. Topics Status Motivation Simple type vs. complex type.
1 WS-Policy. 2 What’s the Problem? To use a web service a client needs more information than is provided in WSDL file. Examples: –Does service support.
1 G52IWS: Web Services Description Language (WSDL) Chris Greenhalgh
EGEE is a project funded by the European Union under contract IST WSDL Which WSDL Style ?
EGEE is a project funded by the European Union under contract IST WSDL Which WSDL Style ? 17 th October
CITA 330 Section 4 XML Schema. XML Schema (XSD) An alternative industry standard for defining XML dialects More expressive than DTD Using XML syntax Promoting.
Web Services: Principles & Technology Slide 3.1 Chapter 3 Brief Overview of XML COMP 4302/6302.
4 Copyright © 2004, Oracle. All rights reserved. Validating XML by Using XML Schema.
Extensible Markup Language (XML) Pat Morin COMP 2405.
XML BASICS and more…. What is XML? In common:  XML is a standard, simple, self-describing way of encoding both text and data so that content can be processed.
Week-12 (Lecture-1) Cascading Style Sheets (CSS): describe how documents are presented on screens. Types of Style Sheets: External Style Sheet - Define.
Unit 4 Representing Web Data: XML
Designing software applications
XML QUESTIONS AND ANSWERS
XML Schemas for Dublin Core Metadata
NA4 Test Team Status Test meeting, 07/09/04
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
The XML Language.
Chapter X IXXXXXXXXXXXXXXXX.
Web Programming Maymester 2004
Chapter 9 Web Services: JAX-RPC, WSDL, XML Schema, and SOAP
Namespace Review 21-Nov-18.
Namespaces.
Introduction to Web Services Protocols
ece 720 intelligent web: ontology and beyond
Namespace Review 29-Dec-18.
Working with Namespaces and Schemas
Quiz Points 2 Rules Raise your hand if you know the question
Allyson Falkner Spokane County ISD
New Applications Modeled
Extensible Markup Language (XML)
Namespace Review 14-Oct-19.
New Perspectives on XML
Presentation transcript:

WSDL Using <import> 17th October 2004 WSDL Using <import> www.eu-egee.org EGEE is a project funded by the European Union under contract IST-2003-508833

Goals To examine the uses of the import element in WSDL documents To see how the use of this element can contribute to re-use and maintainability in WSDL documents. WSDL, 20th October 2004 - 2

One document or many WSDL documents are often thought of and created as single monolithic entities. In order to enhance manageability and re-use of WSDL, where it is created manually, the document can be split into sub –documents. To do this we use the WSDL <import> tag. WSDL, 20th October 2004 - 3

<import> element <definitions targetNamespace=“urn:3950” xmlns= “http://schema.xmlsoap.org/wsdl/” xmlns:xsd= “http://www.w3c.org/2001/XMLSchema” xmlns:soap= “http://schemas.xmlsoap.org/wsdl/soap/” xmlnssoapenc= “http://schemas.xmlsoap.org/soap/emcoding/” xmlns:tns= “urn:3950”> <import namespace= “http://nesc.ac.uk” location= “http://nesc.ac.uk/ez.xsd”/> Acts like C/C++ #include , or Java import. Incorporates external namespaces WSDL, 20th October 2004 - 4

An example of adding complex data types We can examine an example of how to include a complex data type without making our WSDL overly long. The example is based around a notional service book service which contains an ‘object’ BookInfo We will split the definitions into two XMLSchema files (a schema may only contain single <schema> element). WSDL, 20th October 2004 - 5

Service related definitions bookTypes.xsd <?xml version=“1.0” encoding=“UTF-8”?> <schema targetNamespace=“urn:jwsnut.chapter2.bookservice/types/BookQuery” ………> <complexType name=“ArrayOfBookInfo”> <complexContent> <restriction base=“soap-enc:Array”> <attribute ref=“soap-enc:arrayType” wsdl:arrayType=“tns:BookInfo[]”/> </restriction> </complexConent> </complexType> <complexType name=“BookInfo”> <sequence> <element name=“author” type=“string”/> <element name=“title” type=“string”/> </sequence> </schema> WSDL, 20th October 2004 - 6

JAX-RPC specific type definitions baseTypes.xsd <?xml version=“1.0” encoding=“UTF-8”?> <schema targetNamespace=“http://java.sun.com/jax-rpc-ri/internal” ………> <complexType name=“hashMap”> <complexContent> <extension base=“tns:map”> <sequence/> </extension> </complexContent> </complexType> <complexType name=“map”> <restriction base=“soap-enc:Array”> <attribute ref=“soap-enc:arrayType” wsdl:arrayType=“tns:mapEntry[]”/> </restriction> </complexConent> <complexType name=“mapEntry”> <sequnece> <element name=“key” type=“anyType”/> <element name=“value” type=“anyType”/> </sequnece> </schema> WSDL, 20th October 2004 - 7

Comparing the schema These are each free standing XMLSchema documents Each has its own <schema> element and declares a target namespace for its definitions. These namespaces are different. bookTypes.xsd uses the book service namespace baseTypes.xsd uses the private JAX-RPC reference implementation namespace. WSDL, 20th October 2004 - 8

Using these schema in WSDL <?xml version=“1.0” encoding=“UTF-8”?> <definitions name=“BookService” …………..> <import namespace=“urn:jwsnut.chapter2.bookservice/types/BookQuery” location=“bookTypes.xsd”/> <import namespace=“http://java.sun.com/jax-rpc-ri/internal” location=“baseTypes.xsd”/> <message name=“BookQuery_getAuthor”> <part name=“String1” type=“xsd:string”/> </message> ………………… </definitions> WSDL, 20th October 2004 - 9

<import> attributes The WSDL import element must have: namespace – the namespace which the definitions are to be imported into. This must match the target namespace defined in the imported schema location – a URI which indicates where the imported definitions can be found WSDL, 20th October 2004 - 10

Inline or imported? Imported types are not wrapped in the <types> element. It is possible to mix imported and inline definitions within the same document. Inline definitions are within <types> elements. WSDL, 20th October 2004 - 11

Mixed import, inline example <import namespace=“urn:jwsnut.chapter2.bookservice/types/BookQuery” location=“bookTypes.xsd”/> <import namespace=“http://java.sun.com/jax-rpc-ri/internal” location=“baseTypes.xsd”/> <types> <schema targetNamespace=“……………………….”> </schema> </types> WSDL, 20th October 2004 - 12

Nesting inclusion of types There is also a XMLSchema import element which allows definitions to be referenced from one schema to another Similar to nested #includes in C++ header files This is different to the WSDL import element and inhabits the XMLSchema namespace The XMLSchema import element allows definitions from a different namespace to the target namespace for its parent schema WSDL, 20th October 2004 - 13

Schema import example <?xml version=“1.0” encoding=“UTF-8”?> <schema targetNamespace =“urn:jwsnut.chapter2.bookservice/types/BookQuery”.………..> <import namespace=“http://java.sun.com/jax-rpc-ri/internal” schemaLocation=“baseTypes.xsd”/> </schema> WSDL, 20th October 2004 - 14

Importing other types of definition The WSDL import element can be used to include all types of definitions that can appear in a WSDL document. Each set of definitions could be separated out into a different document. This can aid re-use. For instance the generic definitions of a web service can be separated from the service element. This would allow a single service definition to describe several different instances of a service at different locations. WSDL, 20th October 2004 - 15