SlideShare a Scribd company logo
Quick Intro toQuick Intro to
XML Schemas & SOAPXML Schemas & SOAP
Noah MendelsohnNoah Mendelsohn
Lotus 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 & structs
Types you define in schemaTypes you define in schema
You can indicate types:You can indicate types:
Directly in your message using xsi:typeDirectly in your message using xsi:type
Optionally: 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 documents
Structures: the overall languageStructures: the overall language
Datatypes: 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
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
Namespaces and
Schema Documents
One Schema Doc per NamespaceOne Schema Doc per Namespace
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
Validates:
<po:purchaseOrder
xmlns:po="yourURI">
....
</po:purchaseOrder>
A SOAP MessageA SOAP Message
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://{soaporg}/envelope/"
SOAP-ENV:encodingStyle=
"http://{soaporg}/encoding/">
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="Some-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP SchemaSOAP Schema
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://{soaporg}/envelope/"
SOAP-ENV:encodingStyle=
"http://{soaporg}/encoding/">
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="Some-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
soapenv.xsd: validates SOAP's vocabulary
SOAP Schema & User SchemaSOAP Schema & User Schema
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://{soaporg}/envelope/"
SOAP-ENV:encodingStyle=
"http://{soaporg}/encoding/">
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="Some-URI">
<symbol>DIS</symbol>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
soapenv.xsd stockquote.xsd
Declaring Elements and
Attributes
A Sample InstanceA Sample Instance
<?xml version="1.0"?>
<purchaseOrder orderDate="1999-10-20">
<shipTo country="US">
<name>Alice Smith</name>
<street>123 Maple Street</street>
<city>Mill Valley</city>
<state>CA</state>
<zip>90952</zip>
</shipTo>
<billTo country="US">...</billTo>
<comment>Hurry, my lawn is going wild!</comment>
<items>
<item partNum="872-AA">...</item>
<item partNum="926-AA">...</item>
</items>
</purchaseOrder>
A SchemaA Schema
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
Elements have TypesElements have Types
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
Elements have TypesElements have Types
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
Built in
types
Elements have TypesElements have Types
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
User-defined
Types
Global elementsGlobal elements
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
Global
elements
useable
anywhere
Locally scoped elementsLocally scoped elements
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
Locally
scoped
elements
useable only
in parent
type
Attributes have TypesAttributes have Types
<xsd:schema xmlns:xsd="..." targetNamespace="yourURI">
<xsd:element name="purchaseOrder" type="POType"/>
<xsd:element name="comment" type="xsd:string"/>
<xsd:complexType name="POType">
<xsd:sequence>
<xsd:element name="shipTo" type="USAddress"/>
<xsd:element name="billTo" type="USAddress"/>
<xsd:element ref="comment" minOccurs="0"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
........
</xsd:schema>
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"
<width>
10
</width>
Elements
<height>
20
</height>
Simple type captures what's common:
It's an integer
Type has a name (xsd:integer)
Simple types work on attrs and elements
Types for ElementsTypes for Elements
<width>
10
</width>
Simple type
<height>
20
</height>
<width unit="cm">
10
</width>
Complex type
<height unit="cm">
20
</height>
Type(s) capture what's common:
It's an integer + attribute
Type has a name (yourns:measure)
More Complex Types for ElementsMore Complex Types for Elements
<ShipTo>
<street>1 Main St.</street>
<city state="NY">Albany</city>
</ShipTo>
Element
<BillTo>
<street>13 Market St.</street>
<city state="CA">San Jose</city>
</BillTo>
Complex types are for elements:
Sharing content models, attr lists.
Type has a name (somens:address)
Self-describing SOAP MsgsSelf-describing SOAP Msgs
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://{soaporg}/envelope/"
SOAP-ENV:encodingStyle=
"http://{soaporg}/encoding/">
<SOAP-ENV:Body>
<m:GetLastTradePrice xmlns:m="Some-URI">
<symbol xsi:type="xsd:string">
DIS
</symbol>
<quoteDate xsi:type="xsd:date">
1999-05-21
</quoteDate>
</m:GetLastTradePrice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
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 & structs
Types you define in schemaTypes you define in schema
You can indicate types:You can indicate types:
Directly in your message using xsi:typeDirectly in your message using xsi:type
Optionally: in an external schema documentOptionally: in an external schema document

More Related Content

What's hot

Xml 2
Xml  2 Xml  2
Distilled mongo db by Boris Trofimov
Distilled mongo db by Boris TrofimovDistilled mongo db by Boris Trofimov
Distilled mongo db by Boris Trofimov
Alex Tumanoff
 
The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)
ungerik
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
sullis
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
Doug Domeny
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
rfischer20
 
22 j query1
22 j query122 j query1
22 j query1
Fajar Baskoro
 
Introduction towebmatrix
Introduction towebmatrixIntroduction towebmatrix
Introduction towebmatrix
Pranav Ainavolu
 
XStream
XStreamXStream
XStream
Angelin R
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?
Yurii Bilyk
 
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web TechnologyInternet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Ayes Chinmay
 
JSON
JSONJSON
Chrome DevTools Basics
Chrome DevTools BasicsChrome DevTools Basics
Chrome DevTools Basics
Low-Code Starter Pack
 
The Rise of NoSQL
The Rise of NoSQLThe Rise of NoSQL
The Rise of NoSQL
Arnd Kleinbeck
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)
Raghu nath
 
An introduction to javascript
An introduction to javascriptAn introduction to javascript
An introduction to javascript
tonyh1
 
SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4
Usman Zafar Malik
 
Informasjonsintegrasjon – hva er utfordringene
Informasjonsintegrasjon – hva er utfordringeneInformasjonsintegrasjon – hva er utfordringene
Informasjonsintegrasjon – hva er utfordringene
Stian Danenbarger
 
JSON Injection
JSON InjectionJSON Injection

What's hot (20)

Xml 2
Xml  2 Xml  2
Xml 2
 
Distilled mongo db by Boris Trofimov
Distilled mongo db by Boris TrofimovDistilled mongo db by Boris Trofimov
Distilled mongo db by Boris Trofimov
 
The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)The go-start webframework (GTUG Vienna 27.03.2012)
The go-start webframework (GTUG Vienna 27.03.2012)
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
22 j query1
22 j query122 j query1
22 j query1
 
Introduction towebmatrix
Introduction towebmatrixIntroduction towebmatrix
Introduction towebmatrix
 
XStream
XStreamXStream
XStream
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?
 
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web TechnologyInternet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
 
JSON
JSONJSON
JSON
 
Chrome DevTools Basics
Chrome DevTools BasicsChrome DevTools Basics
Chrome DevTools Basics
 
The Rise of NoSQL
The Rise of NoSQLThe Rise of NoSQL
The Rise of NoSQL
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)
 
An introduction to javascript
An introduction to javascriptAn introduction to javascript
An introduction to javascript
 
SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4
 
Informasjonsintegrasjon – hva er utfordringene
Informasjonsintegrasjon – hva er utfordringeneInformasjonsintegrasjon – hva er utfordringene
Informasjonsintegrasjon – hva er utfordringene
 
JSON Injection
JSON InjectionJSON Injection
JSON Injection
 

Viewers also liked

Create link button in radgrid dynamically without item template tags in aspx ...
Create link button in radgrid dynamically without item template tags in aspx ...Create link button in radgrid dynamically without item template tags in aspx ...
Create link button in radgrid dynamically without item template tags in aspx ...
Aravindharamanan S
 
00016335
0001633500016335
Sq lite manager
Sq lite managerSq lite manager
Sq lite manager
Aravindharamanan S
 
Dynamically define rad grid using code behind in c# grid - ui for asp
Dynamically define rad grid using code behind in c#   grid - ui for aspDynamically define rad grid using code behind in c#   grid - ui for asp
Dynamically define rad grid using code behind in c# grid - ui for asp
Aravindharamanan S
 
Jaxrs 1.0-final-spec
Jaxrs 1.0-final-specJaxrs 1.0-final-spec
Jaxrs 1.0-final-spec
Aravindharamanan S
 
Cdn tutorial adcom
Cdn tutorial adcomCdn tutorial adcom
Cdn tutorial adcom
Aravindharamanan S
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Aravindharamanan S
 
Radgrid
RadgridRadgrid
Cdn
CdnCdn
Walkthrough asp.net
Walkthrough asp.netWalkthrough asp.net
Walkthrough asp.net
Aravindharamanan S
 
Android examples
Android examplesAndroid examples
Android examples
Aravindharamanan S
 
Tutorial 1
Tutorial 1Tutorial 1
Tutorial 1
Aravindharamanan S
 
sample tutorial
 sample tutorial  sample tutorial
sample tutorial
Aravindharamanan S
 

Viewers also liked (13)

Create link button in radgrid dynamically without item template tags in aspx ...
Create link button in radgrid dynamically without item template tags in aspx ...Create link button in radgrid dynamically without item template tags in aspx ...
Create link button in radgrid dynamically without item template tags in aspx ...
 
00016335
0001633500016335
00016335
 
Sq lite manager
Sq lite managerSq lite manager
Sq lite manager
 
Dynamically define rad grid using code behind in c# grid - ui for asp
Dynamically define rad grid using code behind in c#   grid - ui for aspDynamically define rad grid using code behind in c#   grid - ui for asp
Dynamically define rad grid using code behind in c# grid - ui for asp
 
Jaxrs 1.0-final-spec
Jaxrs 1.0-final-specJaxrs 1.0-final-spec
Jaxrs 1.0-final-spec
 
Cdn tutorial adcom
Cdn tutorial adcomCdn tutorial adcom
Cdn tutorial adcom
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Radgrid
RadgridRadgrid
Radgrid
 
Cdn
CdnCdn
Cdn
 
Walkthrough asp.net
Walkthrough asp.netWalkthrough asp.net
Walkthrough asp.net
 
Android examples
Android examplesAndroid examples
Android examples
 
Tutorial 1
Tutorial 1Tutorial 1
Tutorial 1
 
sample tutorial
 sample tutorial  sample tutorial
sample tutorial
 

Similar to Schemas and soap_prt

Xsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOAXsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOA
prathap kumar
 
Xsd basics
Xsd basicsXsd basics
Xsd basics
xavier john
 
Wsdl
WsdlWsdl
Spring Web Service, Spring Integration and Spring Batch
Spring Web Service, Spring Integration and Spring BatchSpring Web Service, Spring Integration and Spring Batch
Spring Web Service, Spring Integration and Spring Batch
Eberhard Wolff
 
Ws rest
Ws restWs rest
Ws rest
patriknw
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)
Sumant Tambe
 
Protobuf it!
Protobuf it!Protobuf it!
Protobuf it!
Aleksandr Mokrov
 
130919 jim cordy - when is a clone not a clone
130919   jim cordy - when is a clone not a clone130919   jim cordy - when is a clone not a clone
130919 jim cordy - when is a clone not a clone
Ptidej Team
 
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
Donghyeok Kang
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
guestfd7d7c
 
Ridingapachecamel
RidingapachecamelRidingapachecamel
Ridingapachecamel
Apache Event Beijing
 
3-SchemaExamples.pdf
3-SchemaExamples.pdf3-SchemaExamples.pdf
3-SchemaExamples.pdf
KGSCSEPSGCT
 
Zero One Or Many Namespaces
Zero One Or Many NamespacesZero One Or Many Namespaces
Zero One Or Many Namespaces
LiquidHub
 
PresentationML Subject: Presentation
PresentationML Subject: PresentationPresentationML Subject: Presentation
PresentationML Subject: Presentation
Shawn Villaron
 
Web service introduction
Web service introductionWeb service introduction
Web service introduction
Sagara Gunathunga
 
SWOP project and META software
SWOP project and META softwareSWOP project and META software
SWOP project and META software
Michele Filannino
 
SCDJWS 1. xml schema
SCDJWS 1. xml schemaSCDJWS 1. xml schema
SCDJWS 1. xml schema
Francesco Ierna
 
Json at work overview and ecosystem-v2.0
Json at work   overview and ecosystem-v2.0Json at work   overview and ecosystem-v2.0
Json at work overview and ecosystem-v2.0
Boulder Java User's Group
 
Schematron
SchematronSchematron
Schematron
Emiel Paasschens
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
kriszyp
 

Similar to Schemas and soap_prt (20)

Xsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOAXsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOA
 
Xsd basics
Xsd basicsXsd basics
Xsd basics
 
Wsdl
WsdlWsdl
Wsdl
 
Spring Web Service, Spring Integration and Spring Batch
Spring Web Service, Spring Integration and Spring BatchSpring Web Service, Spring Integration and Spring Batch
Spring Web Service, Spring Integration and Spring Batch
 
Ws rest
Ws restWs rest
Ws rest
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)
 
Protobuf it!
Protobuf it!Protobuf it!
Protobuf it!
 
130919 jim cordy - when is a clone not a clone
130919   jim cordy - when is a clone not a clone130919   jim cordy - when is a clone not a clone
130919 jim cordy - when is a clone not a clone
 
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
[제1회 루씬 한글분석기 기술세미나] solr로 나만의 검색엔진을 만들어보자
 
Advanced Json
Advanced JsonAdvanced Json
Advanced Json
 
Ridingapachecamel
RidingapachecamelRidingapachecamel
Ridingapachecamel
 
3-SchemaExamples.pdf
3-SchemaExamples.pdf3-SchemaExamples.pdf
3-SchemaExamples.pdf
 
Zero One Or Many Namespaces
Zero One Or Many NamespacesZero One Or Many Namespaces
Zero One Or Many Namespaces
 
PresentationML Subject: Presentation
PresentationML Subject: PresentationPresentationML Subject: Presentation
PresentationML Subject: Presentation
 
Web service introduction
Web service introductionWeb service introduction
Web service introduction
 
SWOP project and META software
SWOP project and META softwareSWOP project and META software
SWOP project and META software
 
SCDJWS 1. xml schema
SCDJWS 1. xml schemaSCDJWS 1. xml schema
SCDJWS 1. xml schema
 
Json at work overview and ecosystem-v2.0
Json at work   overview and ecosystem-v2.0Json at work   overview and ecosystem-v2.0
Json at work overview and ecosystem-v2.0
 
Schematron
SchematronSchematron
Schematron
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
 

Recently uploaded

怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
Infosec train
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
GNAMBIKARAO
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
KubeCon & CloudNative Con 2024 Artificial Intelligent
KubeCon & CloudNative Con 2024 Artificial IntelligentKubeCon & CloudNative Con 2024 Artificial Intelligent
KubeCon & CloudNative Con 2024 Artificial Intelligent
Emre Gündoğdu
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
dtagbe
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 

Recently uploaded (12)

怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
How to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdfHow to make a complaint to the police for Social Media Fraud.pdf
How to make a complaint to the police for Social Media Fraud.pdf
 
cyber crime.pptx..........................
cyber crime.pptx..........................cyber crime.pptx..........................
cyber crime.pptx..........................
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
KubeCon & CloudNative Con 2024 Artificial Intelligent
KubeCon & CloudNative Con 2024 Artificial IntelligentKubeCon & CloudNative Con 2024 Artificial Intelligent
KubeCon & CloudNative Con 2024 Artificial Intelligent
 
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
一比一原版(uc毕业证书)加拿大卡尔加里大学毕业证如何办理
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 

Schemas and soap_prt

  • 1. Quick Intro toQuick Intro to XML Schemas & SOAPXML Schemas & SOAP Noah MendelsohnNoah Mendelsohn Lotus Development Corp.Lotus Development Corp. Oct. 12, 2000Oct. 12, 2000
  • 2. 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 & structs Types you define in schemaTypes you define in schema You can indicate types:You can indicate types: Directly in your message using xsi:typeDirectly in your message using xsi:type Optionally: in an external schema documentOptionally: in an external schema document
  • 3. Schema WG StatusSchema WG Status Hope for candidate recommendation soonHope for candidate recommendation soon Three documentsThree documents Structures: the overall languageStructures: the overall language Datatypes: integer, float, date, etc.Datatypes: integer, float, date, etc. Primer: start with this!Primer: start with this! Public working drafts availablePublic working drafts available
  • 4. A SchemaA Schema <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema>
  • 6. One Schema Doc per NamespaceOne Schema Doc per Namespace <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema> Validates: <po:purchaseOrder xmlns:po="yourURI"> .... </po:purchaseOrder>
  • 7. A SOAP MessageA SOAP Message <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://{soaporg}/envelope/" SOAP-ENV:encodingStyle= "http://{soaporg}/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol>DIS</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
  • 8. SOAP SchemaSOAP Schema <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://{soaporg}/envelope/" SOAP-ENV:encodingStyle= "http://{soaporg}/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol>DIS</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope> soapenv.xsd: validates SOAP's vocabulary
  • 9. SOAP Schema & User SchemaSOAP Schema & User Schema <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://{soaporg}/envelope/" SOAP-ENV:encodingStyle= "http://{soaporg}/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol>DIS</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope> soapenv.xsd stockquote.xsd
  • 11. A Sample InstanceA Sample Instance <?xml version="1.0"?> <purchaseOrder orderDate="1999-10-20"> <shipTo country="US"> <name>Alice Smith</name> <street>123 Maple Street</street> <city>Mill Valley</city> <state>CA</state> <zip>90952</zip> </shipTo> <billTo country="US">...</billTo> <comment>Hurry, my lawn is going wild!</comment> <items> <item partNum="872-AA">...</item> <item partNum="926-AA">...</item> </items> </purchaseOrder>
  • 12. A SchemaA Schema <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema>
  • 13. Elements have TypesElements have Types <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema>
  • 14. Elements have TypesElements have Types <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema> Built in types
  • 15. Elements have TypesElements have Types <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema> User-defined Types
  • 16. Global elementsGlobal elements <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema> Global elements useable anywhere
  • 17. Locally scoped elementsLocally scoped elements <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema> Locally scoped elements useable only in parent type
  • 18. Attributes have TypesAttributes have Types <xsd:schema xmlns:xsd="..." targetNamespace="yourURI"> <xsd:element name="purchaseOrder" type="POType"/> <xsd:element name="comment" type="xsd:string"/> <xsd:complexType name="POType"> <xsd:sequence> <xsd:element name="shipTo" type="USAddress"/> <xsd:element name="billTo" type="USAddress"/> <xsd:element ref="comment" minOccurs="0"/> <xsd:element name="items" type="Items"/> </xsd:sequence> <xsd:attribute name="orderDate" type="xsd:date"/> </xsd:complexType> ........ </xsd:schema>
  • 21. Attributes width="10" Simple typesSimple types height="20" Same restriction on content = "type" (xsd:integer)
  • 22. Attributes width="10" Simple typesSimple types height="20" <width> 10 </width> Elements <height> 20 </height> Simple type captures what's common: It's an integer Type has a name (xsd:integer) Simple types work on attrs and elements
  • 23. Types for ElementsTypes for Elements <width> 10 </width> Simple type <height> 20 </height> <width unit="cm"> 10 </width> Complex type <height unit="cm"> 20 </height> Type(s) capture what's common: It's an integer + attribute Type has a name (yourns:measure)
  • 24. More Complex Types for ElementsMore Complex Types for Elements <ShipTo> <street>1 Main St.</street> <city state="NY">Albany</city> </ShipTo> Element <BillTo> <street>13 Market St.</street> <city state="CA">San Jose</city> </BillTo> Complex types are for elements: Sharing content models, attr lists. Type has a name (somens:address)
  • 25. Self-describing SOAP MsgsSelf-describing SOAP Msgs <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://{soaporg}/envelope/" SOAP-ENV:encodingStyle= "http://{soaporg}/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol xsi:type="xsd:string"> DIS </symbol> <quoteDate xsi:type="xsd:date"> 1999-05-21 </quoteDate> </m:GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
  • 26. 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 & structs Types you define in schemaTypes you define in schema You can indicate types:You can indicate types: Directly in your message using xsi:typeDirectly in your message using xsi:type Optionally: in an external schema documentOptionally: in an external schema document