Wednesday, November 16, 2011

Migrating the Metadata from Oracle SOA Suite 10g to 11g and sharing the common artifacts to MDS Repository.


Migrating the Metadata from Oracle  SOA Suite 10g to 11g and sharing the common artifacts to Repository:

If we use the Domain Value Maps (DVMs) or Cross References in Oracle BPEL Process Manager 10g or Oracle Enterprise Service Bus 10g project, the Xpath functions used to access the domain value maps or cross references will be upgraded automatically when the projects are upgraded in Oracle JDeveloper 11g.
However, a manual upgrade task has to be performed to upgrade the domain value maps and cross references that are saved in the Oracle Enterprise Service Bus repository. Also, if we use the common schemas or WSDLs in 10g project the same should be migrated to MDS repository; in 11g all the common artifacts will be stored in MDS repository.

There is a lot of information for the same topic but thought of sharing my experience.
Below are the steps for migrating the DVMs and XREFs to 11g and also to create the project that will have all the common artifacts like DVM, XREF, WSDL and SCHEMAs that can be stored to MDS repository.

Export the DVM and XREF metadata from 10g server: (Steps should be executed on 10 g server)

  1. Log on to your Oracle SOA Suite 10g server.
  2. cd $ORACLE_HOME/integration/esb/bin
  3. Set the environment - ./ esbsetenv.sh
  4. Run the export.sh script to export the entire ESB metadata - ./export.sh metadata10g.zip.
  5. Copy the metadata10g.zip file from $ORACLE_HOME\integration\esb\bin to the Oracle SOA 11g server.

Convert the ZIP file to an Oracle SOA Suite 11g archive file (Steps should be executed on 11g server) :

  1. Log on to your Oracle SOA 11g server
  2. Set your environment:
export DomainHome=<<Weblogic DomainHome>>
export OracleHome=<<OracleHome>>
cd $DomainHome/bin
. setDomainEnv.sh
  1. Execute the below comments to convert the 10g metadata to 11g format.
cd $OracleHome/bin
ant -f ant-sca-upgrade.xml upgrade-xrefdvm -Dsource=<<Path to metadata10g.zip>> -Dtarget= <<Target path>>
  1. Copy the archive sca_XrefDvmFiles10g_rev1.0.jar generated in target path to local machine.

Create the Metadata project:

  • Create a new Generic Application (e.g. MetaDataApp) in JDeveloper 11g.
  • Click “Next” and Give a Project Name e.g. Metadata.
  • From the Oracle JDeveloper 11g “File” menu, select “Import”, then “SOA Archive into SOA Project”. In the Import Composite Archive Dialog Box, click Browse and locate the sca_XrefDvmFiles10g_rev1.0.jar file that you created previously.
  • Make sure that the Project Name and Composite Name in the Create SOA Project from SOA Archive dialog box and Import Composite Archive Dialog Box have the same name.
  • Click Finish to create the new SOA project. The new project consists of an empty composite, along with the upgraded Xref and DVM files.
  • Crete new folders with the name Xref, dvm, faultpolicy, schemas and WSDL under SOAContent of the project folder based on the different type of artifacts needs to be stored in MDS.




Monday, November 14, 2011

Steps to migrate the JAVA web services from Oracle SOA Suite 10g to 11g.


Steps to migrate the JAVA web services from Oracle SOA Suite 10g to 11g:

Because of the container change from 10g to 11g, the web services developed in 10g has to be migrated to latest format.

The main step for the migration is changing the deployment descriptors created for OC4J to vendor specific descriptor format.


Steps to migrate the JAVA web services from Oracle SOA Suite 10g to 11g:

1. Change the Web.xml (<Webservice Home>/public_html/WEB-INF) contents:-
Replace the below contents in the web.xml.
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns: xsi=http://www.w3.org/2001/XMLSchema-instance xsi: schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version="2.4">
With the following contents
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns: xsi=http://www.w3.org/2001/XMLSchema-instance xsi: schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd version="2.5">
In 10g:-



In 11g:-




Sunday, November 13, 2011

Oracle SOA Suite 11g - Purging Metadata Version History for SOA-INFRA


Oracle SOA Suite 11g - Purging Metadata Version History for SOA-INFRA:

For database-based MDS repositories, you can purge the metadata version history from a partition. (File-based MDS repositories do not maintain version history.) This operation purges version history of unlabeled documents from the application's repository partition. The tip version (the latest version) is not purged, even if it is unlabeled.

To purge labeled documents, you must first delete the label.

Consider purging metadata version history on a regular basis as part of MDS Repository maintenance, when you suspect that the database is running out of space or performance is becoming slower. This operation may be performance intensive, so plan to do it in a maintenance window or when the system is not busy.
To use WLST to purge metadata version history, use the purgeMetadata command. You specify the documents to be purged by using the older than parameter, specifying the number of seconds.

The following example purges all documents older than 100 seconds:


wls:/offline> connect ()
Please enter your username: weblogic
Please enter your password:
Please enter your server URL [t3://localhost:7001] :t3://soahost:soaport
Connecting to t3://nft-soa-vip1:8004 with userid weblogic...
Successfully connected to managed Server 'SOA1' that belongs to domain 'SOACoreDomain'.
wls:/SOACoreDomain/serverConfig> purgeMetadata(application='soa-infra', server='SOA1', olderThan=100)
Executing operation: purgeMetadata.
Metadata purged:Total number of versions: 3925.
Number of versions purged: 0.

wls:/SOACoreDomain/serverConfig>

To use Fusion Middleware Control to purge the metadata version history:

  1. From the navigation pane, expand the farm, expand SOA and then right click on soa-infra.
  2. From the menu, choose Administration then choose MDS Configuration.




Oracle SOA Suite 11g - Metadata Labels in the MDS Repository


Oracle SOA Suite 11g - Metadata Labels in the MDS Repository:

A metadata label is a means of selecting a particular version of each object from a metadata repository partition. Document versions belonging to a label are not deleted by automatic purging, unless the label is explicitly deleted. In this way, creating a label guarantees that a view of the metadata as it was at the time the label was created remains available until the label is deleted.

You can use a label to view the metadata as it was at the point in time when the label was created. You can use the commands to support logical backup and recovery of an application's metadata contained in the partition.

Labels are supported only in database-based repositories.

The following topics describe how to manage labels:


· Creating Metadata Labels
· Deleting Metadata Labels
· Listing Metadata Labels
· Promoting Metadata Labels

  1. Creating Metadata Labels


To create a label for a particular version of objects in a partition in an MDS Repository, you use the WLST command createMetadataLabel. For example, to create a label named prod1 for the application soa-infra, use the following command:

wls:/offline> connect ()
Please enter your username: weblogic
Please enter your password:
Please enter your server URL [t3://localhost:7001] :t3://soahost:soaport
Connecting to t3://nft-soa-vip1:8004 with userid weblogic...
Successfully connected to managed Server 'SOA1' that belongs to domain 'SOACoreDomain'.
wls:/SOACoreDomain/serverConfig> createMetadataLabel (application='soa-infra', server='SOA1', name='prod1')
Executing operation: createMetadataLabel.
Created metadata label "prod1".
wls:/SOACoreDomain/serverConfig>
If the application has more than one version, you must use the applicationVersion parameter to specify the version.

  1. Deleting Metadata Labels

To delete a metadata label, you use the WLST command deleteMetadataLabel. For example, to delete a label named prod1 for the application soa-infra use the following command:
deleteMetadataLabel (application='soa-infra', server='SOA1', name='prod1')
If the application has more than one version, you must use the applicationVersion parameter to specify the version.

  1. Listing Metadata Labels

You can list the metadata labels for a particular application. To do so, use the WLST command listMetadataLabel. For example, to list the labels for the application soa-infra, use the following command:
listMetadataLabels(application='soa-infra', server='SOA1')
If the application has more than one version, you must use the applicationVersion parameter to specify the version.

  1. Promoting Metadata Labels

You can promote documents associated with a metadata label so that they are now the last version. That is, you can promote them to the tip. Promote a label if you want to roll back to an earlier version of all of the documents captured by the label.
To promote a label to the tip, use the WLST command promoteMetadataLabel. For example to promote the label prod1, use the following command:
promoteMetadataLabel(application='soa-infra', server='SOA1', name='prod1')
If the application has more than one version, you must use the applicationVersion parameter to specify the version.