Upload
prathap-kumar
View
86
Download
1
Tags:
Embed Size (px)
Citation preview
XML Schema Definition
• What is XSD and its purpose?
• what is DTD and DTD Vs XSD.
• XSD Basics.
• Some Sample XSDs.
• Installation of Oracle SOA suite 11.1.1.3.
• Conclusion.
muraliksoa@gmailcom
What is XSD and its purpose?
• XML Schema Definition acts as the base in generating and validating the XML documents.
• Purpose• Structure of the xml elements
• Allowed elements
• Elements order
• Elements type
muraliksoa@gmailcom
what is DTD and DTD Vs XSD• DTD stands for Document type definition
• It is also useful in validating xml documents.
• Sample DTD and XSD for Address xml documents.
DTD for Address XML<?xml version="1.0" encoding="UTF-8"?><!ELEMENT address (street+, city, state, zip)><!ELEMENT street (#PCDATA) ><!ELEMENT city (#PCDATA) ><!ELEMENT state (#PCDATA) ><!ELEMENT zip (#PCDATA) ><!ATTLIST address category CDATA #REQUIRED >
muraliksoa@gmailcom
DTD vs XSD contd..• XSD for Address XML<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema"xmlns:fc="http://www.friendzcorp.com/OracleSoabook"targetNamespace="http://www.friendzcorp.com/OracleSoabook"><element name="address" type="fc:Address" /><complexType name="Address"><sequence><element name="name" type="string" /><element name="street" type="string" /><element name="city" type="string" /><element name="state" type="string" /><element name="zip" type="string" /></sequence></complexType></schema> muraliksoa@gmailcom
• Address instance based on address XSD
<?xml version="1.0" encoding="UTF-8"?>
<addr:address
xmlns:addr="http://www.friendzcorp.com/
OracleSoabook">
<name>Murali</name>
<street>1st street</street>
<city>Hyderabad</city>
<state>Andhra Pradesh</state>
<zip>500045</zip>
</addr:address>
muraliksoa@gmailcom
Data types
-Simple types(44 types are there)
Defined in http://www.w3.org/2001/XMLSchema
Ex: int - accepts numbers like 1234,8904.
boolean – accepts only true or false
float – accepts decimals like 23.45
string – accepts strings like “murali”
- User defined or complex types
Ex: Address, Purchase Order etc.,.
XSD basics contd..
muraliksoa@gmailcom
Nested complex types:<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema"xmlns:fc="http://www.friendzcorp.com/OracleSoabook"targetNamespace="http://www.friendzcorp.com/OracleSoabook" ><element name="purchaseOrder" type="fc:PurchaseOrder" /><element name="address" type="fc:Address" /><complexType name="PurchaseOrder"><sequence><element name="accountName" type="string" /><element name="accountNumber" type="unsignedShort" /><element name="shipAddress" type="fc:Address" /><element name="billAddress" type="fc:Address" /><element name="book" type="fc:Book" /><element name="total" type="float" /></sequence></complexType><complexType name="Address"><sequence><element name="name" type="string" /><element name="street" type="string" /><element name="city" type="string" /><element name="state" type="string" /><element name="zip" type="string" /></sequence></complexType>
Sample XSDs
muraliksoa@gmailcom
Sample XSDs Contd..
Usage of Occurrence constraints:<complexType name="Address"><sequence><element name="name" type="string" /><element name="street" type="string"minOccurs="1" maxOccurs="2" /><element name="city" type="string" /><element name="state" type="string" /><element name="zip" type="string" /></sequence></complexType>
muraliksoa@gmailcom
Oracle SOA 11.1.1.3 Installation
muraliksoa@gmailcom
1. Database installation2. RCU( Repository creation utility)
For creating schemas for Products like OWSM, SOA infra, webcenter etc.
3. Middleware home creation.This the place where Jdevelper and weblogic server will be installed.
4. SOA suite Installaion11.1.1.2 installation and upgrading to 11.1.1.3.Here installation of BPEL PM, Mediator , B2B, business rules, Human
work flow etc., will takes place.
5. Domain creation.6. Server connection establishment for deploying
application to server.
Conclusion
• What we have seen?
– What is XSD?
– Some sample XSDs
– Oracle SOA 11.1.1.3 Installation.
muraliksoa@gmailcom
?muraliksoa@gmailcom
muraliksoa@gmailcom