Successfully reported this slideshow.

Getting started-with-oracle-so a-ii


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Getting started-with-oracle-so a-ii

  1. 1. Getting Started with Oracle SoA BASIC CONCEPT OF ORACLE SOA Lab#2 Description: BISP is committed to provide BEST learning material to the beginners and advance learners. In the same series, we have prepared a complete end-to end Hands-on Beginner’s Guide for Oracle SoA. The document focuses on basic keywords, terminology and definitions one should know before starting Oracle SoA. Join our professional training program and learn from experts. History: Version Description Change Author Publish Date 0.1 Initial Draft Shiva Kant Pandey 21th Aug 2012 0.1 Review#1 Amit Sharma 29th Aug 2012 Page 1
  2. 2. Objective : Basic course required for SOA INTRODUCTION TO XSD (Xml Schema Definition) • What is XSD ? • Structure of XSD • Target namespace Attribute of xsd: schema • xmlns registration • xsd element type • xsd complex type • Reusing Complex Type objects XSD : " The XML Schema Definition (XSD) is a reference library that provides an API for use with any code that examines, creates or modifies W3C XML Schema (standalone or as part of other artifacts, such as XForms or WSDL documents). XSD is a library that provides an API for manipulating the components of an XML Schema as described by the W3C XML Schema specifications, as well as an API for manipulating the DOM-accessible representation of XML Schema as a series of XML documents, and for keeping these representations in agreement as schemas are modified." To create a New Project on Oracle JDeveloper 11g step wise procedure is mentioned below : [Step 1] : Start your graphical desktop window & it will appear as shown in figure Page 2
  3. 3. Step2 : Double click on oracle Jdeveloper icon . Step 3: After double click Select Role window will appear choose Default Role & it will enable all technologies . Click OK button . Step 4: Now successfully we have entered into Oracle JDeveloper page . Click on this new button icon which is shown in left corner of page & a New Gallery window will appear on same page. Page 3
  4. 4. Click on : Current Project Technologies ---> Applications --->SOA Application ---> click OK. Step 5: Select Application Name & fill on blank . I have taken SOAApplicaton as Application Name & click Next Tab. Page 4
  5. 5. Step 6:Now it will prompt for Project Name select project name as your own choice ex- Project1. Select ADF Business Components ---> SOA---> Next . Page 5
  6. 6. Note: There are various Application Development Framework (ADF) to develop your application so choose as per need. Step 7: To configure SOA Setting select Empty Composite ---> click Finish so successfully created Project1 as new project . Page 6
  7. 7. ==> Inside red box observe SOAApplication as Application Name & Project1 under Project is created. TO CREATE .XSD FILE STEPWISE PROCEDURE IS MENTIONED BELOW So far discussion was to create new project now under project1 start to create new Book type .xsd file : Step1: Right click on xsd ---> New . Page 7
  8. 8. Step 2: Click All Technologies ---> XML --->XML Schema ---> OK Note: We are going to create XML schema in .xsd file . Page 8
  9. 9. Step 3: Now Enter details of your new file ex- Book.xsd or Book Schema.xsd & click OK. Here point to consider is 1) Target Namespace 2) Prefix Target Namespace : This is used for unique identification of each element in XML by parser. Prefix: Prefix is shortcut of Namespace . Take bobj as prefix for BookType xsd file, here 'b' represent Book type & 'obj' represents Object . Step 4: On left Pane observe BookSchema.xsd is created under xsd . On right side of left pane is a predefined XSD schema. • 1st circle represents start of schema & 2nd circle end of schema . In xsd:schema xsd is used here as prefix which is generated by w3 organization & it is a shortcut of namespace xmlns:xsd="". Page 9
  10. 10. So in this schema we observe Target namespace now we can see the structure in which they have taken "exampleElement" as name of element. • At the bottom inside green box there are three options 1. Design mode: In design mode we can see what we have designed . 2. Source mode: In source mode we create schema of xml in xsd as shown in above figure. Page 10
  11. 11. 3. History: We can see the history of schema created. Step 5: Design Bookschema.xsd structure inside parent schema. • xmlns:xsd="http//" is namespace which describes the schema of xml by w3 organization & provide standard prefix xsd to all elements inside schema. • xmlns:bobj="http//" this is registration of target namespace. • ListOfBooks is a XSD element & its type is ListOfBookType • ListOfBookType is a complextype element • Complextype xsd are those in which one or more than simple elements are in this example there are three complex types . • So start from first complex type i.e Book Type as shown in figure with purple box. • <xsd:sequence> means that all simple elements inside complex type arranged in a sequence . Page 11
  12. 12. • So this BookType contains name ,author,price inside it with their types. Type plays important role in xsd it gives meaning to the element name . 1. name is "xsd: string" type 2. author is "xsd: string" type 3. Price is "xsd:decimal " type • Similarly Subject Type contains three elements in well defined sequence Here we have taken type as "bobj:BookType" because each subject contains BookType structure[name, author,price] & hence there are three book inside subjectType . In design mode it looks as shown below Page 12
  13. 13. • Similarly for ListOfBooktype which contains "Book" as its element & type of book is "bobj:SubjectType" So Book comes under list of books type & subject type under book Design mode: Page 13
  14. 14. Finally ListOfBooks element contain ListOfBookType. Step 6: In this step we notice following points: 1. what is minOccurs , maxoccurs, nillable ? 2. what is annotation ? So let us see the structure in source mode : Page 14
  15. 15. • minoccurs & maxoccurs means how many number of times this name element occurs. 1. Example /> 1<author occurs<1 meaning author will occur once only. 2. Example /> means minimum occurrence of Book is one & maximum it can occur unbounded i.e infinite times. Page 15
  16. 16. • NILLABLE These are of two types: 1) TRUE 2) FALSE nillable="true" means that value of element should be nil. nillable="false" means that value of element should not be nil i.e element must have value. • ANNOTATION annotation are of two types 1) Documentation 2) appinfo . As shown below in source mode Page 16
  17. 17. 1) Documentation : In computer industry , documentation is the information provided to a customer or other user about a product or the process of preparing it. 2) Appinfo : The appinfo element specifies information to be used by the application. the element must go within an annotation element. Let us see how Design looks : Page 17
  18. 18. It represents minoccurs="1" & max occur="unbounded" . Page 18
  19. 19. Page 19