Friday, December 10, 2010

How to export shared artifacts from MDS

   As a best practice in projects, shared artifacts like WSDL’s/XSD’s/DVM’s are stored in MDS. It is really difficult to maintain consistency of these files in case multiple updates are made on these files. All developers will be familiar with the use of version control, where first step would be to get the latest from the Repository and make modifications to the source code and commit the changes. Similar approach needs to be followed here, where exportSharedData task in ant-sca-deploy.xml needs to be used to get all the latest artifacts in a jar file. Extract the files and update your local folders.
Initial steps include setting of environment variables.
set ORACLE_HOME=D:\Oracle\Middleware
set ANT_HOME=%ORACLE_HOME%\jdeveloper\ant
set PATH=%ANT_HOME%\bin;%PATH%
set JAVA_HOME=%ORACLE_HOME%\jdk160_18
You can always export the artifacts from MDS using the exportSharedData ant task.
>> ant -f ant-sca-deploy.xml exportSharedData -DserverURL=server.url -DjarFile=jar.file -Dpattern=pattern ex/** -Duser=username –Dpassword=pwd
  • exportSharedData :: is the ant task in ant-sca-deploy.xml
  • serverURL  ::The URL of the server that hosts the SOA Infrastructure application (for example, http://hostname:8001).
  • jarFile :: The absolute path of the JAR file to be generated. (C:\temp\dvm.jar)
  • pattern :: The file pattern supported by MDS transfer APIs. Use the semicolon delimiter (;) if multiple patterns are specified.
Exclude the shared data namespace /apps in the pattern.
 For example:
/dvm/**;/xref/**
This example exports all documents under /apps/dvm and /apps/xref.
  • user ::  The user name for accessing the server
  • password  :: The password for accessing the server
Thanks to Edwin for all the help.

Thursday, December 9, 2010

SOA Composer with DVM’s

DVM’s become a headache if you have shared DVM’s across projects and multiple people try to update it.SOA Composer helps you in maintaining consistency for editing and maintaining the DVMs by allowing users to access all DVMs through the console. The SOA Composer is an EAR file, which is installed as part of Oracle SOA Suite installation. It enables you to manage domain value maps at runtime. I will take you thru steps on how to use it.
Login using the below URL

To view domain value maps at runtime:

From the Open menu, select Open DVM.
It will list you all the DVM’s present in the server with Partition and Composite name. It will mention Composite Name if DVM is deployed along with the Composite. If the Composite is accessed from MDS store, then Composite name will be shown as N/A

Select DVM to view the entries in DVM

How to Edit Domain Value Maps at Runtime

The domain value map opens in an edit session.
To add rows:
1.    Click Add Domain Values.
2.    Enter values and click OK. The entered values are added to the domain value map.
To edit rows:
1.    Select the row that you want to edit.
2.    Click Edit Domain Values. Edit the values as required and click OK.

To delete rows:
1.    Select the rows that you want to delete.
2.    Click Delete Domain Values.

Saving DVM’s at Runtime

Every time a domain value map is opened in an edit session, a sandbox is created per domain value map, per user. If you save your changes, then the changes are saved in your sandbox.
1.    Click the Save menu item to save your changes. If your changes are saved successfully, you receive a notification message.

Undo Changes made to DVM’s at Runtime

You can also revert a domain value map to the last saved state.
1.    Click the Revert menu item. A confirmation dialog is displayed.

Commit Changes at Runtime

Once you commit the changes, runtime picks up the changes and saves them in the MDS repository. In a session, you can also save your changes without committing them. In such a case, the domain value map remains in the saved state. You can reopen the domain value map and commit the changes later.
Note :
In some scenarios customers prefer to keep all DVMs in one shared project and use these DVMs across all SOA projects. After DVM project is deployed to production, DVM values are added /modified from SOA composer. But when they try to add a new DVM to the shared DVM project and redeploy to production, it overrides all changes made through SOA composer. This is a typical scenario you should avoid while designing. In order to avoid this issue, try to use MDS for storing the DVM’s. If you have DVM’s @MDS we can always go ahead an export the updated DVM’s and modify the exported DVM for further usage.

Friday, December 3, 2010

How to Configure XPath Expression to retrieve more information from the Business Message in B2B Console

This blog is on how to retrieve important information and show as part of the B2B message on B2B console which will help in tracking the message. I will explain in detail on how to configure Xpaths in the console so as to retrieve information

1.    Click on Administration and Select Document tab, and select the document definition for which you want to extract information


2.    Select XPath tab . Add xpath expressions as below. Save the document definition
When using EDI documents which have default namespace, the usage of  //*[local-name()='Name of the XSD element'] is preferred.
For eg:- //*[local-name()=’Element-143']/text()


3.    Go to Partners Page
4.    Select the Partner, and click on agreement. Click on deploy to make changes reflect on the B2B agreement.


5.    Run a test case by placing a TP EDI document in the configured path.
6.    Click on Reports. Select the Details button Business message to see the message details.


As you can see the values are extracted from the payload using the local-name function. So if you know the element name for which the value needs to extracted, these Xpath functions helps you to extract data and show on B2B console.