Getting Started with Security for your Oracle SOA Suite Integrations
Getting Started With Oracle SoA IV
-
Upload
amit-sharma -
Category
Documents
-
view
222 -
download
0
Transcript of Getting Started With Oracle SoA IV
-
7/27/2019 Getting Started With Oracle SoA IV
1/31
Getting Started with Oracle SoA
INTRODUCTION TO WSDL(WEB SERVICE DESCRIPTION LANGUAGE) Lab#4
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 Beginners Guide for Oracle SoA. The document focuses on WEB
SERVICE DESCRIPTION LANGUAGE. 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.bisptrainigs.com www.hyperionguru.com Page 1
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
2/31
PART III INTRODUCTION TO WSDL(WEB SERVICE DESCRIPTION LANGUAGE)
WITH THE HELP OF PROJECT
WSDL :The Web Services Description Language is an XML-based interface descriptionlanguagethat is used for describing the functionality offered by a web service.A WSDL description of a web service (also referred to as a WSDL file) provides amachine-readable description of how the service can be called, what parameters itexpects, and what data structures it returns.
KEY ELEMENTS USED INSIDE WSDL :1. Types2. Message3. Port Type4. Binding5. service6. Partner Link Type
For better understanding consider a basic Project " ProcessNumbers" & focus onfollowing points -:
ABSTRACT WSDL
COMPOSITE XML
BPEL PROCESS COMPONENT
BPEL PROCESS
COMPILATION & DEPLOY
CONCRETE WSDL
TEST
INSTANCES
1. BASIC PROJECT ON "PROCESSNUMBERS"Step 1: Create new project
New --->All Technologies--->SOA Tier --->SOA project --->OK ---> Project Name
(ProcessNumbersProject) ---> ADF Business Component---> SOA--->Next -->Empty Composite ---> FinishNow you can see your project on left pane with all its contents so as we need to startour project with XSD .
Step 2: Createa new xsd file under project
Right click on xsd--> file name(ProcessNumbers.xsd) --> Target
Namespace(http://www.bispsolutions.com/training/soa/schema/ProcessNumbers)-->
prefix (psobj) -->ok
Now created successfully ProcessNumbers.xsd as shown in figure :
www.bisptrainigs.com www.hyperionguru.com Page 2
http://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/Interface_description_languagehttp://en.wikipedia.org/wiki/Interface_description_languagehttp://en.wikipedia.org/wiki/Web_servicehttp://www.bisptrainigs.com/http://en.wikipedia.org/wiki/XMLhttp://en.wikipedia.org/wiki/Interface_description_languagehttp://en.wikipedia.org/wiki/Interface_description_languagehttp://en.wikipedia.org/wiki/Web_servicehttp://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
3/31
target Namespace
Prefix taken psobj
Take two elements 1) ProcessNumbersRequest 2) ProcessNumbersResponse
Define their complex types shown in blue boxes .
save xsd.
HINT : Here in example consider two numbers i.e NumberA & NumberB & then we
have to perform ADD operation .
www.bisptrainigs.com www.hyperionguru.com Page 3
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
4/31
Step 2:
Click on Design Mode & u can see xsd in a well designed manner as shown in figure:
Step 3 : To create WSDL file:
Click NEW--->All Technologies --->Web Services --->WSDL Document ---> OK
www.bisptrainigs.com www.hyperionguru.com Page 4
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
5/31
www.bisptrainigs.com www.hyperionguru.com Page 5
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
6/31
Step 4 : Fill all required blanksWSDL Name(ProcessNumbers) --->Directory name(leave as it is but delete up to yourproject name i.e Process numbers ) ----> Targetnamespace(give target name space butuse wsdl in place of schema) ---> Create port type (ProcessNumbersInterface)
---> Select Service Style(Document) ----> OK .Service Style is mainly of two types :
1) Document 2)RPC Document: the content of is specified by XML Schema defined in
the section. It does not need to follow specific SOAP conventions.In short, the SOAP message is sent as one "document" in the element without additional formatting rules having to be considered. Documentstyle is the default choice.
RPC:The structure of an RPC style element needs to comply withthe rules specified in detail in Section 7 of the SOAP 1.1 specification. Accordingto these rules, may contain only one element that is named afterthe operation, and all parameters must be represented as sub-elements of thiswrapper element.
Step 5: Shown below is Abstract WSDL File , in wsdl file isthe root element of wsdl schema .
www.bisptrainigs.com www.hyperionguru.com Page 6
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
7/31
Target Namespace
tns is prefix of targetnamespaceElements Used In WSDL are :
TYPES:The types element encloses data type definitions that are relevant for the exchangedmessages. For maximum interoperability and platform neutrality, WSDL prefers the useof XSD as the canonical type system, and treats it as the intrinsic type system.
MESSAGE:Inside Message we write whatever information is requested by service consumer &What response needed from service provider . These messages are transportedthrough transporting medium example HTTP with SOAP protocol.
Message element consists of PART name & element & part is a partition of message &there should be n number of parts inside a message.Messages should be one or more than one.
PORT TYPE : It is a web service interfaceport type defines interface ,operation , operation , input & output .
Step 6:
Import ProcessNumbers.xsd inside as shown & keep this schema inside
wsdl type.
Step 7:
www.bisptrainigs.com www.hyperionguru.com Page 7
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
8/31
write message name & its part name & part element .note : Part element is prefixed So never forget to register its name space as shownbelow:
Step 8: Mention its port type as shown below
Write name of Port type i.e "ProcessNumbersInterface"
we are Adding two numbers hence we choose ADD as its operation.
Write its input & output with prefix tns.
Finally Save WSDL file by clicking save button
Step 9: Clickon Design Mode & see that relationship between Messages & port type.
www.bisptrainigs.com www.hyperionguru.com Page 8
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
9/31
Step 10: To create BPEL Process Click on composite .xml
Step 11: This composite .xml is partitioned into three sections
1. Exposed Services2. Components3. External refrences
Now right click on component section and choose BPEL Process.
www.bisptrainigs.com www.hyperionguru.com Page 9
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
10/31
Step 12:Fill all its blank spaces& browse wsdl file by clicking its icon
Note : Here choose Template " Base on a WSDL " means we already havea wsdl file .In our Next Projects we will create wsdl file directly from template by choosing differentoptions these are:
www.bisptrainigs.com www.hyperionguru.com Page 10
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
11/31
Click OK.
www.bisptrainigs.com www.hyperionguru.com Page 11
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
12/31
Step 13: Now observe Exposed Service as ProcessNumbersService and BPELcomponentProcessNumbersProcess
Step 14 : Cick on source mode at bottom & see the composite xml as shown below
www.bisptrainigs.com www.hyperionguru.com Page 12
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
13/31
Step 15: Again go to design mode of composite .xml & doubleclick on here
Step 16: This window is ProcessNumbersProcess.bpel window & here we will createour logics & conditions by using Component Palette
So here we have again three sections so first section is a process number servicesectionor we can say service section , middle section is BPEL process section which works asmediator & third section is for reference section & cover it on latter examples.
www.bisptrainigs.com www.hyperionguru.com Page 13
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
14/31
Step 17: Drag assign activity from component palette & put between receive input &reply output.Right click on Assign activity & select edit --> General--> Name(Assign Result)
Click on Copy Rules & Explore output variable & then result integer
drag this expression icon into Result element & a new window prompt as shownbelow:
www.bisptrainigs.com www.hyperionguru.com Page 14
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
15/31
select Number A ---> click Insert Into Expression ----> Plus Sign (+) --->select Number
B---> Click Insert Into Expression . Now Click OK.Click OK
www.bisptrainigs.com www.hyperionguru.com Page 15
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
16/31
Step 18: Compile by clicking compile icon & see below that build succesfull , if thereis an error make correction then again compile & diagnosis build
www.bisptrainigs.com www.hyperionguru.com Page 16
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
17/31
www.bisptrainigs.com www.hyperionguru.com Page 17
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
18/31
Step 19 A : Deploy project by clicking Process Numbers Project .
Step 19B : click Deploy to Application server ---> Next
www.bisptrainigs.com www.hyperionguru.com Page 18
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
19/31
Step 19 C: mark these fields & click to Next
Step 20 : Start Server First as shown below :
Click on Start /Stop Weblogic servers
Mark Admin Server With SOA & EM then click START wait for few minutes
www.bisptrainigs.com www.hyperionguru.com Page 19
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
20/31
Server is now running
Step21: Select your application server click Next
Step 22: Looking up for soa server ..
www.bisptrainigs.com www.hyperionguru.com Page 20
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
21/31
Step23: Select admin server & click Next.
Click Finish.
Step 24 : Click on Browser icon shown below:
www.bisptrainigs.com www.hyperionguru.com Page 21
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
22/31
Step 25: Start your enterprise manager by writing url http: //localhost:7001/em/
Note : Here localhost is application server & 7001 is a port in which enterprisemanager is running.
Step 26 : Login using credentials
User Name :weblogicPassword : welcome1click on login
Step 27: We have successfully login inside Enterprise manager 11g (Farm_dev_soa)
we can clearly observe here that admin server is up & all deployment status is also upit means that our admin server is running .Now In left pane of window under Farm_dev_soa click on SOA radio button now againexpand & under default we can easily see all the deployed projects.Click twice on Process Numbers Project .
www.bisptrainigs.com www.hyperionguru.com Page 22
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
23/31
Step 28: Observe that all information regarding to Process Numbers Project is givenRunning instances 0 means that yet we have not tested any instance.
Total 0Project Status ActiveNow click on Browser tab
www.bisptrainigs.com www.hyperionguru.com Page 23
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
24/31
Step 29 : Click on WSDL URL
Step 30: Now it is a Concrete WSDL , Right click on page & select View Page Source
Now we can see full Concrete WSDL & this wsdl contains Binding & serviceinformation additionally.
www.bisptrainigs.com www.hyperionguru.com Page 24
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
25/31
Binding simply means that packaging message in packet with SOAP protocol again aquestion arises that what is soap protocol ?SOAP Protocol : SOAP, originally defined as Simple Object Access Protocol, isa protocolspecification for exchanging structured information in the implementationofWeb Services in computer networks. It relies on XML Information Set for its messageformat, and usually relies on other Application Layerprotocols, most notably Hypertext
Transfer Protocol(HTTP) or Simple Mail Transfer Protocol(SMTP), for message
negotiation and transmission.
Copy location address & paste in browser URL & now get the ABSTRACT WSDL &observe it .
www.bisptrainigs.com www.hyperionguru.com Page 25
http://en.wikipedia.org/wiki/Protocol_(computing)http://en.wikipedia.org/wiki/Web_Servicehttp://en.wikipedia.org/wiki/Computer_networkhttp://en.wikipedia.org/wiki/XML_Information_Sethttp://en.wikipedia.org/wiki/Application_Layerhttp://en.wikipedia.org/wiki/Hypertext_Transfer_Protocolhttp://en.wikipedia.org/wiki/Hypertext_Transfer_Protocolhttp://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocolhttp://www.bisptrainigs.com/http://en.wikipedia.org/wiki/Protocol_(computing)http://en.wikipedia.org/wiki/Web_Servicehttp://en.wikipedia.org/wiki/Computer_networkhttp://en.wikipedia.org/wiki/XML_Information_Sethttp://en.wikipedia.org/wiki/Application_Layerhttp://en.wikipedia.org/wiki/Hypertext_Transfer_Protocolhttp://en.wikipedia.org/wiki/Hypertext_Transfer_Protocolhttp://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocolhttp://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
26/31
-
7/27/2019 Getting Started With Oracle SoA IV
27/31
Now Insert Number A =5
& Number B = 10Click on Test Web Service
& get Result =15 as shown below
Step 33: Click on Launch Flow Trace
www.bisptrainigs.com www.hyperionguru.com Page 27
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
28/31
-
7/27/2019 Getting Started With Oracle SoA IV
29/31
Step 35: Click on Receive input & observe BPEL instance in xml
www.bisptrainigs.com www.hyperionguru.com Page 29
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
30/31
Step 36: Similarly click on Assign result in flow diagram & observe BPEL instance inxml
Step 37: Similarly click on Reply Output
Step 38: Click on Faults & check it.
www.bisptrainigs.com www.hyperionguru.com Page 30
http://www.bisptrainigs.com/http://www.bisptrainigs.com/ -
7/27/2019 Getting Started With Oracle SoA IV
31/31
Step 39: Now again double click on ProcessNumbersProcess project on left pane &observe that now after first test it created Instance with its instance id & instancestate.Now since we have completed our test & wanted to exit from enterprise manager ,Click on ShutDown Tab & then LogOut.
Step 40 : Stop Admin server if don't want to further deploy any projectClick Start/stop weblogic servers ----> mark on Admin Server radio ---> Stop