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:
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.

Wednesday, November 24, 2010

Using Oracle MDS with B2B Document definitions in B2B and Composite

Oracle Metadata Services Repository (MDS) is used for asset centralization patterns .It removes duplication across projects and clustered environment and simplifies maintenance in case of future changes. This blog looks at how the B2B document definitions can be used across B2B and Composite in SOA Suite 11g using oracle MDS.

What all can be accommodated in MDS

The following artifacts are to be stored in the MDS:
·         All abstract WSDLs, schemas, and shared XSLs pertaining to the canonical model and applications
·         Default fault policy
·         Cross-reference metadata and domain value maps

SOA-MDS Connection Configuration

  1. Go to New GalleryàConnectionsàSOA-MDS Connection
  2. Create a database connection to MDS store.
  3.  Create a new SOA-MDS Connection. It requires a database connection to MDS store. So create a connection to MDS store. Use DEV-MDS user for listing the partitions in MDS store. Select  soa-infra as MDS partition
Next step is to go for the B2B adapter configuration.

B2B Adapter Configuration

  1. Drag and drop B2B adapter on to Exposed Services swim lane of the composite.
  2. Enter the environment specific values in the B2B configuration Wizard Step 1-6.
  3. In step 6 Use the Advanced option. Select the Refer Schema in B2B Repository option and point to the MDS store.
  1. Select the trading partner specific document definition.

  1. Finish the configuration
What about the schema location?
    Since we are referring to the XSD in B2B schemas in MDS store, it will not create a local copy in the project.
The schema location in wsdl will be referring to the MDS store. 


<schema xmlns="">
   <import namespace="urn:oracle:integration:b2b:117AF8A8105B4DA3A9BDA0DBB7D2FA6C"

Correlating Location of Doc Definitions with B2B Console

The location will be referring to the same location where we added the XSDs in B2B.

oramds:/soa/b2b -> Default location in MDS where all B2B document definitions are stored

EDI_X12/4010/850/Geo_850_def/geo_850.xsd -> the folder structure in which the doc definitions are defined in B2B console

This should help you in getting started with MDS usage along with B2B. Happy thanksgiving :)