Background
How to collaborate/share a predefined xml schema or wsdl or edl (in fact, any kind of static or application resources) across multiple oracle soa-projects ? Example: if a group of techies working on different Oracle fmw/soa-projects and needs to share a common/canonical/predefined "employee" schema, then what can be their approach?
The answer can be - there are many ways thru which a predefined "employee" schema (here, I am taking "employee" schema as an example) can be shared across multiple Oracle soa-projects. One of the common practice is - copy that employee-schema (meaning import the schema from local file system) into all the required soa-projects in jdeveloper. In many scenarios, this approach works fine, but when you need to change the schema, you will be required to update every copy :(
So the better approach is to have a single copy of employee-schema and make a reference (instead copy or import) of it in all the required soa-projects and composites. But how ???
Solution thru MDS
There are two ways which allows you to share the common artifacts across Oracle soa-projects, those are MDS (metadata service) and OER. For now, my topic is on MDS (in my later posts, I can provide some details on setup and usage of OER). MDS supports two types of repositories, those are file based and database repositories. In this blog, I am providing the details of database based MDS repository.
Key steps in defining and using MDS Database repository are -
How to collaborate/share a predefined xml schema or wsdl or edl (in fact, any kind of static or application resources) across multiple oracle soa-projects ? Example: if a group of techies working on different Oracle fmw/soa-projects and needs to share a common/canonical/predefined "employee" schema, then what can be their approach?
The answer can be - there are many ways thru which a predefined "employee" schema (here, I am taking "employee" schema as an example) can be shared across multiple Oracle soa-projects. One of the common practice is - copy that employee-schema (meaning import the schema from local file system) into all the required soa-projects in jdeveloper. In many scenarios, this approach works fine, but when you need to change the schema, you will be required to update every copy :(
So the better approach is to have a single copy of employee-schema and make a reference (instead copy or import) of it in all the required soa-projects and composites. But how ???
Solution thru MDS
There are two ways which allows you to share the common artifacts across Oracle soa-projects, those are MDS (metadata service) and OER. For now, my topic is on MDS (in my later posts, I can provide some details on setup and usage of OER). MDS supports two types of repositories, those are file based and database repositories. In this blog, I am providing the details of database based MDS repository.
Key steps in defining and using MDS Database repository are -
- Create common files (with a proper directory structure) in local Jdeveloper.
- Deploy/export that directory along with files to MDS (FMW database)
- Refer those common files (from MDS) in Jdeveloper and soa-projects.
Stage1: Create predefined/common files (or directory) in local file system.
- create a directory called "apps" (you can create with any name) in <jdeveloper_home>/jdeveloper/integration/seed
- keep all the files (wsdl, xml schemas, edl, property files - what not any file you can think of) in this directory, which you want to share across all the SOA projects and composites.
Stage2: Deploy that directory (or files) to MDS
- Create a dummy SOA Project and define the deployment profile (at project level) to include (contribute) the above created directory (in our case it is "apps"). Projects -> Deployment -> new -> Archive type is Jar -> In the Deployment profile properties -> select Contributors -> select the required directories and files -> and OK.
- Make sure that corresponding Application of above dummy project should also have a deployment profile of Archive type "SOA Bundle", and previously created dummy project profile as a dependent. Application Menu -> Application properties -> Deployment -> new -> Archite type : SOA Bundle -> select previously created dummy project's deployment profile. thats it...
- Once the dummy project's and application's deployment profiles are created, deploy the application as a SAR file in to your local system and deploy it to Weblogic server.
Stage3: Refer those common files (from MDS) in Jdeveloper and soa-projects
- In Jdeveloper, create a SOA_MDS connection from the Items list. This will launch MDS Connection wizard. Specify some needed details such as connection location, connection type (in our case it is MDS Database) and provide the necessary weblogic server details such as servername, portname, userid/password and other connection details. thats it.. you are all set with the MDS repository access in Jdeveloper.
- Once MDS connection is established, always refer the files directly from MDS-Repository instead create a local copies at project level. Example: We can import schemas (or any files or application resources) from mrs in a similar fashion to how we import from local file system. Instead selecting the file system (browse button), launch SOA Resource browser -> resource Palette -> select schema that you wish to import -> make sure to "De SELECT" copy to Project option. This will refer the schema directly from MDS and the schemaLocation attribute contains "oramds:/apps/<<file/schema name>>"
This MetadataService (MDS) allows you to share (centralize) common artifacts such as schemas, wsdls, edls and some application resources across SOA-Compisites.
No comments:
Post a Comment