Hi All,
Today i am going to present a blog over how we can connect with MDS repo and how we can share common resources between multiple SOA project. The basic concept of using MDS repo is to upload some common resources like WSDL,XSD etc.. to a file based MDS repo or DB based MDS repo.
As JDEV default use file based MDS repo, it it good if you are in development mode but if your SOA service is going to live in test or production then it will be good habit to use DB based MDS repo because with DB based MDS repo changes will directly impact in DB and no redeployment will take place for such case.
In SOA Suite 11g there is a widely used option to share artifacts (WSDL, XML, XSD, DVM, Rules, Scripts, Fault Policies, among others …) through MDS – Meta Data Store facilitating the reuse of these artifacts within the SOA projects
I will help you in this post to create and configure the MDS in JDeveloper.
When, for example, a BPEL or BPM project is implemented (deploy) your files are stored in MDS and any change in any artifact will be reflected only in MDS requiring only perform deploy only this file and not an entire project.
Once the MDS is set and stored content, referencing within the project is quite simple, inform, to the location, the full path within the MDS and including oramds prefix. See the example:
To reference the XSD that is the way apps/DemoMDS: do –> oramds: /apps/ DemoMDS.xsd
How to deploy resources in SOA MDS Repo:

Select Generic Project


Now right-click on the project MDSSOAExport and click New
Click Folder and then OK
I will create the first folder “apps“



Select Apps folder and click OK

Note: The Resources folder and the readme.txt file are created automatically.
Repeat this same procedure creating folders “wsdl” and “xsd” inside the “apps“folder, so they are as follows:

You can delete readme.txt file as they don’t have any use.
Copy WSDL and XSD that you need to share.
Now we configure the adf-config.xml file so that objects (wsdl, xsd or any ot)er file created in MDSSOAExport project can be shared with other projects.
To edit the adf-config.xml file click Application Resources in your JDeveloper, go Descriptors >> ADF META-INF >> adf-config.xml and open the file.
Note: The adf-config.xml file is unique for application

Locate the following part of your file:
<metadata-namespaces>
<namespace metadata-store-usage="mstore-usage_1" path="/soa/shared"/>
<namespace metadata-store-usage="mstore-usage_2" path="/deployed-composites/default"/>
</metadata-namespaces>

Now let’s add one more line that part of the file should look like this:
<namespace path="/apps" metadata-store-usage="mstore-usage_3"/>

Now well below that of the XML locate the <metadata-store-usages>
This is for file based MDS.
<metadata-store-usage id="mstore-usage_1">
<metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
<property value="${oracle.home}/integration"
name="metadata-path"/>
<property value="seed" name="partition-name"/>
</metadata-store>
</metadata-store-usage>
Let’s now add the other part of the XML that will also reference our artifacts that should look like this (As we are going to use data base MDS repo so we need SOA RCU DB for same):
Add following code in adf file:
<metadata-store-usage id="mstore-usage_3">
<metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property value="USERNAME_MDS" name="jdbc-userid"/>
<property value="jdbc:oracle:thin:@DBURL:DBPORT:DBSID"
name="jdbc-url"/>
<property value="soa-infra" name="partition-name"/>
</metadata-store>

So far everything is OK, you can deploy it to SOA server now.
Now, with the right click button click MDSSOAExport and click Project Properties,Click Deployment and then New

In the screenshot below place the commonResources name and click OK
Note: Can be any other name

In the screenshot below click Contributors and then click on Project Source Path then click OK

In the screenshot below then click OK again.

Now click the right button directly in your application and click Application Properties

Click Deployment and the right side in New
Note: Here we create a deployment type Sounds Bundle, so will give soabundle name
So Archive Type in place the SOA Bundle option
In Name: place soabundle and click OK

Now click Dependencies and the right side select the commons option MDSSOAExport.jpr and click OK

In the screenshot below click OK again

Okay, now you can make the deploy locally of its MDS artifacts
Just remember that to change any XSD or WSDL file that is within the MDSSOAExport project apps folder. you should do the deploy locally normally, here’s how:
In your Menu, click Application >> Deploy >> soabundle

On the next screen click Next, leaving marked the default option in the case Deploy to Application Server

Click Next again
In this option, select server on which you want to deploy it and click Next

Click Next again

In the guide below its JDeveloper Deployment Log in check appeared the message
Logs:
[10:56:42 AM] Adding shared data file - C:\Users\Sandeep\AppData\Local\Temp\deploy_client_65d96547-1c8f-4320-b505-a4a8d4cf8e9f\commonResources.jar
[10:56:42 AM] Preparing to send HTTP request for deployment
[10:56:42 AM] Creating HTTP connection to host:sandeep-PC, port:8001
[10:56:42 AM] Sending internal deployment descriptor
[10:56:42 AM] Sending archive - commonResources.jar
[10:56:43 AM] Received HTTP response from the server, response code=200
[10:56:43 AM] Successfully deployed archive soabundle.zip to partition "default" on server soa_server1 [http://sandeep-PC:8001]
[10:56:43 AM] Elapsed time for deployment: 2 seconds
[10:56:43 AM] ---- Deployment finished. ----
Note: If you will login in to http://localhost:7001/em server you will not find deployed JAR in console as only composites are available not the resources.
Now we will connect with our MDS DB Repo.
Click on New and select SOA-MDS connection and provide RCU data base details.


As you can see common resources here now.
Now we can import these resource in any project and can use them.
Create a SOA project.
Drag a web service component in composite file


URL of WSL is look likes:
oramds:/apps/apps/wsdl/Services.wsdl
Hope you will enjoy to work with this blog !!!
Comments
Post a Comment