quick intro to xml schemas & soap ?· how soap uses schemas to define soap's xml vocabulary...

Download Quick Intro to XML Schemas & SOAP ?· How SOAP uses Schemas To define SOAP's XML vocabulary Optionally: to define your msg. vocabulary SOAP encoding uses schema

Post on 30-Jan-2018

213 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • Quick Intro to Quick Intro to XML Schemas & SOAPXML Schemas & SOAP

    Noah MendelsohnNoah MendelsohnLotus Development Corp.Lotus Development Corp.Oct. 12, 2000Oct. 12, 2000

  • How SOAP uses SchemasHow SOAP uses Schemas

    To define SOAP's XML vocabularyTo define SOAP's XML vocabulary

    Optionally: to define your msg. vocabularyOptionally: to define your msg. vocabulary

    SOAP encoding uses schema "types"SOAP encoding uses schema "types"Schema builtin datatypes: integer, float, date, etc.Schema builtin datatypes: integer, float, date, etc.SOAP builtins for arrays & structsSOAP builtins for arrays & structsTypes you define in schemaTypes you define in schemaYou can indicate types:You can indicate types:

    Directly in your message using xsi:typeDirectly in your message using xsi:typeOptionally: in an external schema documentOptionally: in an external schema document

  • Schema WG StatusSchema WG Status

    Hope for candidate recommendation soonHope for candidate recommendation soon

    Three documentsThree documentsStructures: the overall languageStructures: the overall languageDatatypes: integer, float, date, etc.Datatypes: integer, float, date, etc.Primer: start with this!Primer: start with this!

    Public working drafts availablePublic working drafts available

  • A SchemaA Schema

    ........

  • Namespaces and Schema Documents

  • One Schema Doc per NamespaceOne Schema Doc per Namespace

    ........

    Validates:

    ....

  • A SOAP MessageA SOAP Message

    DIS

  • SOAP SchemaSOAP Schema

    DIS

    soapenv.xsd: validates SOAP's vocabulary

  • SOAP Schema & User SchemaSOAP Schema & User Schema

    DIS

    soapenv.xsd stockquote.xsd

  • Declaring Elements and Attributes

  • A Sample InstanceA Sample Instance

    Alice Smith 123 Maple Street Mill Valley CA 90952 ... Hurry, my lawn is going wild! ... ...

  • A SchemaA Schema

    ........

  • Elements have TypesElements have Types

    ........

  • Elements have TypesElements have Types

    ........

    Built in types

  • Elements have TypesElements have Types

    ........

    User-defined Types

  • Global elementsGlobal elements

    ........

    Global elements useable

    anywhere

  • Locally scoped elementsLocally scoped elements

    ........

    Locally scoped

    elements useable only

    in parent type

  • Attributes have TypesAttributes have Types

    ........

  • Simple and Complex Types

  • Attributes

    width="10"

    Simple typesSimple types

    height="20"

  • Attributes

    width="10"

    Simple typesSimple types

    height="20"

    Same restriction on content = "type"

    (xsd:integer)

  • Attributes

    width="10"

    Simple typesSimple types

    height="20"

    10

    Elements

    20

    Simple type captures what's common:It's an integerType has a name (xsd:integer)Simple types work on attrs and elements

  • Types for ElementsTypes for Elements

    10

    Simple type

    20

    10

    Complex type

    20

    Type(s) capture what's common:It's an integer + attributeType has a name (yourns:measure)

  • More Complex Types for ElementsMore Complex Types for Elements

    1 Main St. Albany

    Element

    13 Market St. San Jose

    Complex types are for elements:Sharing content models, attr lists.Type has a name (somens:address)

  • Self-describing SOAP MsgsSelf-describing SOAP Msgs

    DIS

    1999-05-21

  • Summary: Summary: How SOAP uses SchemasHow SOAP uses Schemas

    To define SOAP's XML vocabularyTo define SOAP's XML vocabulary

    Optionally: to define your msg. vocabularyOptionally: to define your msg. vocabulary

    SOAP encoding uses schema "types"SOAP encoding uses schema "types"Schema builtin datatypes: integer, float, date, etc.Schema builtin datatypes: integer, float, date, etc.SOAP builtins for arrays & structsSOAP builtins for arrays & structsTypes you define in schemaTypes you define in schemaYou can indicate types:You can indicate types:

    Directly in your message using xsi:typeDirectly in your message using xsi:typeOptionally: in an external schema documentOptionally: in an external schema document

Recommended

View more >