learnosb.files.wordpress.com€¦ · web viewnow, we have to deploy this project. the server used...

14
Introduction Domain value map (DVM) in Oracle SOA For example, one application might represent a state with the long name (Massachusetts) while another application may represent the state with an abbreviation (MA). A domain-value map enables you to associate values from one application with values from another. Process After a domain-value map is created and populated using Oracle SOA, it can be used with the Oracle JDeveloper Mapper tool while developing XSLT data transformations during design time. Then, at runtime the lookups for application-specific values occur. Example In this scenario, we will demonstrate DVM of countries. We shall pass the short name of a country like ‘IN’ and in response we shall receive ‘INDIA’. Also, we can add more countries to DVM list dynamically and the Oracle SOA will look at those values at run time and give an appropriate response. Steps: 1) First we will create Oracle SOA project in JDeveloper. It has been named as DVMProject in this scenario. 2) Create XSD’s which will have a request and response, here it is named as ShortName in request and FullName in response. 3) Create a BPEL, expose that as a Synchronous Proxy service with the help of those XSD’s which were created

Upload: vuquynh

Post on 30-Aug-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

Introduction

Domain value map (DVM) in Oracle SOA

For example, one application might represent a state with the long name (Massachusetts) while another application may represent the state with an abbreviation (MA). A domain-value map enables you to associate values from one application with values from another.

Process

After a domain-value map is created and populated using Oracle SOA, it can be used with the Oracle JDeveloper Mapper tool while developing XSLT data transformations during design time. Then, at runtime the lookups for application-specific values occur.

Example

In this scenario, we will demonstrate DVM of countries. We shall pass the short name of a country like ‘IN’ and in response we shall receive ‘INDIA’. Also, we can add more countries to DVM list dynamically and the Oracle SOA will look at those values at run time and give an appropriate response.

Steps:

1) First we will create Oracle SOA project in JDeveloper. It has been named as DVMProject in this scenario.

2) Create XSD’s which will have a request and response, here it is named as ShortName in request and FullName in response.

3) Create a BPEL, expose that as a Synchronous Proxy service with the help of those XSD’s which were created

This is the sample xsd having request as ShortName (string) and response as FullName(string)

Page 2: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

This is BPEL created in SOA, its name is given as DVMBpelProcess. It is exposed as HTTP

Inside DVMBPELProcess.bpel file, the input is received in receiveInput activity and response is sent from replyOutput activity. The caller of service shall receive a response according to what logic has been applied here. Here, assign activity is used to pick values from DVM during runtime.

Page 3: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

4) Now, create a Domain value map (DVM) in J Developer

We are naming it as Test.dvm, by default it contains domain1 as source and domain2 as destination column name. domain1-value1 is default name given under domain1 column, similarly for domain2.

Page 4: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

Domain1 column is renamed as SOURCE for better understanding

Similarly, destination column is named as DEST

Page 5: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

Now the domain values given in SOURCE column is IN, and destination column value as INDIA

SG and SINGAPORE

Page 6: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

We are now mapping the incoming request and output response using a SOA DVM function such that if IN is entered in request, output should be ‘INDIA’

Page 7: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

This is how the DVM function looks like, it has 5 inputs

1st – The location of DVM

2nd – The source column name, in this case the name was given as SOURCE

3rd – The dynamic value coming in request, in this case we are getting request in ShortName field.

4th – The destination column name, in this case the name was given as DEST

5th – The default value if the value in source column is not found during run time.

Page 8: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

Now, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c is used. Below is the SOA project under soa-infra partition named as DVMBpel

After clicking on DVMBpel project, it is showing the WSDL service from which we can test this project

Page 9: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

We are testing in enterprise manager now, it is asking for ShortName input. We are passing IN in request

We get response as INDIA under FullName element

Page 10: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

The service can be tested in SOAP UI tool also, the WSDL service which was shown earlier in enterprise manager is been used here. The request is entered as IN and in response we get INDIA

Similarly for SG, it Singapore

Page 11: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

Below is Oracle SOA console where business users can add values in domain value map without making any changes in project or code. A new domain value is being created

We are creating a new country as Dubai below. Giving it as DUB in SOURCE and Dubai in DEST column.

Page 12: learnosb.files.wordpress.com€¦ · Web viewNow, we have to deploy this project. The server used here is Oracle Weblogic 12c. To test this service, Oracle enterprise manager 12c

We are testing the service again using SOAP UI, request is sent as DUB in request and in response it is coming Dubai.

Below, if request is passed which is not present in DVM than it gives response as “Sorry, no country found against this request”