Here I am going through the Domain Value map (DVM) functionality in OSB 12c.
In the 12c versions of OSB, Support for the DVM is included, Hence lets discuss the use case and Steps to implement DVM.
Use Case
Simple Integration Scenarios, Where Source system, Which sends data to Target System needs domain conversion of values.
A very typical example is Country name to Country Code conversion using DVM, i.e. Source system sends Country name and Target system expects Country code.
Design:
Step 1 :
Open Jdevloper 12c (Service Bus console can also be used), Create a Service Bus Project.
I have given name to project as 'DVM'
Step 2:
Create Source and target Schemas or WSDL (This is not a essential Step). For better demonstration, I Have used WSDL.
Step 3:
Create a Domain value map (CountryName_Code.dvm) and Add the Domain Name and Values. Atleast 2 rows needs be added.
Step 4:
Create a XSLT mapper (CountryNameToCode.xsl), Choose Source and Target to this mapper from your WSDL.
Step 5 :
User mapper to drag and Drop mapping element.
Step 6:
Go to XSLT source view and Edit the code as below.
<CountryCode>
<xsl:value-of select="DVMFunctions:lookupValue ("SBProject_DVM/CountryName_Code", "Name", string(/ns0:process/ns0:CountryName), "Code", "Unknown" )"/>
</CountryCode>
Now if you go to Design view, the below design will be visible
Step 7:
Create a new Pipeline Based on your WSDL and go to design view.
Add Pipeline pair to it,
Inside Request Pipeline add a Stage. Inside stage add a 'Replace' action.
Inside Response Pipeline add a Reply action with Success.
Step 8:
Lets go to Replace action and use the Earlier created XSLT mapper to do the DVM task.
Step 9:
Save your changes and Export is to deploy to Test Server or Deploy directly from Jdeveloper.
No comments:
Post a Comment