Getting Started With Oracle SoA II

19
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 Begi nner’s Guide for Or acle SoA. The document focuses on basic keywords, terminology and definitions one should know bef ore star ting 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 29 th Aug 2012 www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.com Page 1

Transcript of Getting Started With Oracle SoA II

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 1/19

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 Date0.1 Initial Draft Shiva Kant Pandey 21th Aug 20120.1 Review#1 Amit Sharma 29th Aug 2012

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 1

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 2/19

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 withany 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 theW3C XML Schema

specifications, as well as an API for manipulatingthe 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

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 2

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 3/19

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.

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 3

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 4/19

Click on :

Current Project Technologies ---> Applications --->SOA Application

---> click OK.

Step 5: Select Application Name & fill on blank . I have takenSOAApplicaton as

Application Name & click Next Tab.

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 4

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 5/19

Step 6:Now it will prompt for Project Name select project name as

your own choice

ex- Project1.

Select ADF Business Components ---> SOA---> Next .

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 5

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 6/19

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 .

 

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 6

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 7/19

==> 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 .

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 7

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 8/19

Step 2: Click All Technologies ---> XML --->XML Schema ---> OK 

Note: We are going to create XML schema in .xsd file .

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 8

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 9/19

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 eachelement 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 namespacexmlns:xsd="http://www.w3.org/2001/XMLSchema".

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 9

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 10/19

So in this schema we observe  Target namespace now we can seethe structure in which they have taken "exampleElement" as nameof 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 inxsd as shown in above figure.

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 10

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 11/19

3. History: We can see the history of schema created.

Step 5: Design Bookschema.xsd structure inside parent schema.

• xmlns:xsd="http//:www.w3.org/2001/XMLSchema" is namespace

which describes the schema of xml by w3 organization & providestandard prefix xsd to all elements inside schema.

• xmlns:bobj="http//:www.oracle.com/schema/Book" 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 nested.so 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 .

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 11

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 12/19

• So this BookType contains name ,author,price inside it with their

types. Type plays important role in xsd it gives meaning to theelement 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 subjectcontains BookType structure[name, author,price] & hence there arethree book inside subjectType . In design mode it looks as shown

below

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 12

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 13/19

 

• 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

bookDesign mode:

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 13

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 14/19

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 :

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 14

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 15/19

• 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.

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 15

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 16/19

• 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

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 16

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 17/19

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 :

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 17

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 18/19

It represents minoccurs="1" & max occur="unbounded" .

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 18

8/22/2019 Getting Started With Oracle SoA II

http://slidepdf.com/reader/full/getting-started-with-oracle-soa-ii 19/19

www.bispsolutions.com  www.bisptrainigs.com www.hyperionguru.comPage 19