ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

32
The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g Edwin Biemond Whitehorses http://biemond.blogspot.com

description

My ODTUG at Kscope 2011 about The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Transcript of ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Page 1: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Edwin Biemond

Whitehorses

http://biemond.blogspot.com

Page 2: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Topics in this presentation

● MDS● Avoiding Invalid Composites● Deployment

● Composites● Resource Adapters● AIA deployment framework

● Testing● TestSuite of SOA Suite● AIA CAVS

● Continuous Integration with Hudson

Page 3: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

MDS MetaData Service

MDS = centralized storage for artifacts that can be accessed both at design time and at run-time

Two versions -> File MDS & Database MDS Versioning in only supported in Database MDS SOA Suite only uses the Database MDS

● Composites can have revisions

JDeveloper can use both● File MDS is the default● MDS is used for validation and used in the

creation process

Page 4: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Using MDS

Store your artifacts in a MDS apps folder● The SOA Suite DB MDS only allows you to add

artifacts under the apps folder. Use for example

oramds://apps/DVM/countries.dvm JDeveloper MDS references are located in

adf-config.xml ( /.adf/META-INF/ )

Page 5: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Use MDS in JDeveloper

Default File MDS is located at jdeveloper/integration/seed

Create an apps folder under seed Create an application or company

folder under the apps folder Add your artifacts under this

application folder

Page 6: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Use MDS in JDeveloper

Create a File MDS Connection

Lookup your artifacts in the Resource Palette

Page 7: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Move the MDS to your workspace

Is part of your workspace -> Versioning & No conflicts Add an extra MDS /apps entry to the adf-config.xml

Page 8: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Avoiding Invalid Composites

Invalid Composites can happen when● A Web Service is used as a Composite Reference

and this WS is not up while starting SOA Suite● The Composite Reference is a Composite and this

Composite is not active while this Composite becomes active

Page 9: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Why does this happen?

When the Composite is started, it tries to load the remote WSDL & XSD in one of the following:● Composite Imports● Composite References● Service Component componentType files

Page 10: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

The Solution

The solution is MDS● Download the remote WSDL & XML schemas and

put this in the MDS● Change the XML Schema imports of the WSDL

so it’s valid and points to the MDS ● If the Composite Reference is a Composite try to

re-use the XSD

Page 11: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Composite Import

Open the composite.xml in source mode and change the imports

Page 12: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Composite Reference

Change the ui:wsdlLocation attribute Binding.ws location attribute has the

Endpoint URL

Page 13: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

ComponentType files

Open the Service componentType files ( Mediator, BPEL) and change the ui:wsdlLocation attribute

Page 14: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Deployment Plan

Only need to change the location attribute of the binding.ws element

Page 15: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Deployment

Ways to deploy your Composites● JDeveloper -> only for Development.● JDeveloper SOA ANT scripts. Need some extra

ANT scripting to make it useable● AIA has its own complete ANT deployment

framework ( needs a license ) Resource Adapters & WebLogic artifacts

● AIA deployment framework can do this● Your own WLST scripting & custom Resource

Adapter Deployment

Page 16: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Deployment ANT Scripts

Need the SOA plugin Located in jdeveloper\bin Build your ANT deployment

framework around these scripts

Page 17: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Manual configuration of Resource Adapters

Use unique file name -> DB_Plan.xml or JMS_Plan.xml● In cluster configuration

● Copy The Resource plan to every node of the cluster● Location of the plan must be the same on all servers● Update the plans on all server if there is a change

● Put it on a shared storage

Page 18: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Your own Resource Adapter

Extract the WebLogic Resource Adapter ( Oracle_SOA1\soa\connectors )

Remove the jars Edit the weblogic-ra.xml and add your own

entries ( use unique names -> conflicts) Pack the Resource Adapter Deploy the Resource Adapter Set the deployment order after the original

adapter

Page 19: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Deployment with AIA

Can also be used in Non AIA Projects Configure AIA Deployment file Available Deployment actions

● JDBC DataSources● JMS Resources● MDS update● Start & shutdown WLS Server● Resource Adapters AQ, DB, JMS● EAR & WARS● Composites

Page 20: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

AIA Deployment configuration

JDBC Datasource

JMS Queue

Update MDS

Shutdown Managed ServerAdd an entry to the DBResource adapter

Deploy a WAR

Deploy a Composite

Page 21: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Testing your Composites

SOAPUI● Test cases are flexible and can be scripted● Stress LoadTest● Simulate (Mock) services but need to update your Composite References

SOA Suite TestSuite● Can’t test the Composite Service● Simulate Composite Reference● Bounded to 1 Composite● Unit Test output

AIA CAVS (Composite Application Validation System)● Test and Simulate Services● Not bounded to 1 Composite● Combine Test cases with simulation ( automatically updates endpoints )● Need a License

Page 22: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

SOA Suite TestSuite

Create a TestSuite with some tests

Page 23: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

SOA Suite TestSuite 2

Initiate a Message on a Service Verify a response on a Wire Emulate a response on a Wire

Page 24: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

TestSuite in Enterprise Manager

Start Unit Tests● From ANT● From EM

Page 25: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

AIA Composite Application Validation System

What can CAVS do for you Create tests and validate responses Simulate Adapter services in the

ABCS Composites Group tests Combine Test and Simulators with

Routing Import / Export Definitions

Page 26: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

CAVS Definitions

Page 27: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

CAVS Test

Load the WSDL and select the operation Define 1 or more Requests Define 1 or more Responses and Generate XPATH

Page 28: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

CAVS Simulator

Define the expected Request, Generate XPath and set its unique identifier ( For matching the request with the response)

Provide the matching Response

Page 29: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

CAVS Routing

Activates CAVS Simulators, change the endpoints of the Composite reference to the simulators

Can be used in a CAVS Test

Page 30: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Continuous Integration with Hudson

Hudson easy to install and manage Support for ANT Integration with SubVersion, CVS Unit Test support Dashboard

Page 31: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Hudson SOA Suite Job

Need to build your own ANT deployment

Checkout SVN Compile Package Deploy Unit Test Evaluate Report

Page 32: ODTUG The Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

changeThe Necessary Knowledge and Tools You Need to Have for SOA Suite 11g

Please Fill Out Your Evaluations

Edwin Biemond

Whitehorses