Inspired by Eric Elzinga , who was wondering how MDS can work in Soa Suite 11g , I made some screenshots how you can use a XSD from a central MDS repository in your composite application. Clemens already blogged about re-using common metadata and he made a great ant utility to import or delete MDS files. For 11G R1 PS1 or higher use this instead of the Clemens utility
First I make a local MDS repository. If you install the Soa plugin you already have a seed folder in the integration folder. Under this folder create an new folder called apps. ( this have has to be apps else you will get a permission denied error ) . Under this apps folder we can create our own definitions.
To use my local SOA-MDS repository I create a new MDS File Connection
I want to re-use these common objects in every Soa project so I choose for the resource palette option
select the seed folder in the integration folder
Here we can see our common application objects.
Open the application resources window and open the adf-config.xml
Here we define a new metadata namespace with apps as path. And use the integration folder as metadata-path value.
We are ready to use these common objects in a mediator.. Here I will use a schema from the local MDS as input parameter for the mediator.
Import a new schema
Select the resource browser and here we can select our schema from the local MDS
I uncheck the Copy to project option, because this XSD already exists in the MDS
Our Project is ready but If we want to deploy this Soa project, we will receive a error, it can't find the schema. So we need to export the local MDS files to the SOA Suite database MDS.
To do this we have 2 options , the first option is to create a MAR deployment ( Application properties ) or do this with Ant.
I stripped the Clemens ant project so this ant build file has only two tasks , add and delete. It uses the adf-config.xml ( config folder) for the location of the target MDS and I use the local MDS as source.
Here is the target adf-config.xml which is located in the config folder
Change the build.properties so it matches your environment
This will import your local MDS object to the remote MDS. After this you can deploy your Soa Suite project.
Here you can download my ant project. Thanks to Clemens.
Hi Biemond, do you know if there is a way to access MDS stored XSD by OSB ? Like an http URL or everything else.
ReplyDeleteGreat post by the way !
Hi,
ReplyDeleteOff course you can do a java callout to access these files.
or when you use a file mds then you can use a network share like \\server\mds\app\...
But I think you want to import a xsd from the mds into a wsdl and use this in a proxy service.
thanks
This comment has been removed by the author.
ReplyDeleteHi,
ReplyDeleteYes, it's exactly what I want, be able to access XSD in the metadata to use it in a proxy service WSDL.
Too bad that OSB can't share XSD with FMW.
Thank you
Hi,
ReplyDeleteI am trying to use your ANT script to update the SOA MDS but I get the following error :
MDS-00001 exception in Metadata Services layer
MDS-00577 Could not acquire read/write lock for {0} within the default waiting time interval
etc.
Have you an idea ?
Thanks for the post!
I am getting a similar error. What change did you have to make?
DeleteThanks
Ok, I've just found the solution!
ReplyDeleteI made a mistake in the adf-config file...
Hi Biemond,
ReplyDeleteYour blob has been very useful. I have used MDS to set up a central location for my wsdl and xsds.
I would like to know if I can access my xsd/wsdl using my internet explorer?
I have set up a database repository for storing MDS data. Did you experienced any performance problems in relation to a file based MDS resposity? Or is the MDS metadata (including my xsd/wsdl) loaded in memory?
I am looking forward to hearing from you.
Hi
ReplyDeleteI would like to know if I can access my xsd/wsdl using my internet explorer?
Do think this is possible.
I have set up a database repository for storing MDS data. Did you experienced any performance problems in relation to a file based MDS resposity?
Database mds is required for soa because of the labels / versioning. Everything in Soa is stored in MDS That's why you can have different version of one composite and promote one
Or is the MDS metadata (including my xsd/wsdl) loaded in memory?
In the database mds you can tune this.
thanks Edwin
Hi Edwin,
ReplyDeleteYour post is really good. I believe this poorly documented feature of SOA suite 11g is one of the key offerings.
I was wondering if you could give us some idea of the same topic but using the DB repository. I followed the instructions of section 38.7.3 (E10224) and I have some issues:
1. If I re-use XSD in a WSDL I get a warning saying that the XSD is outside of the project context, but I don't have the same error if the WSDL is the WSDL of a BPEL process
2. If I deploy the composite application, when I look into the deployed components, I get an error because the XSD is not found
3. The shared XSD are not deployed under /apps, instead they are deployed under /composite-applications
Thanks
Hi,
ReplyDeleteYou have to sync your local MDS with the database MDS of the Soa Suite.
please check this http://biemond.blogspot.com/2009/11/soa-suite-11g-mds-deploy-and-removal.html
this contains some ant script so you can syn and then you will see it is in the apps folder of the DB MDS.
thanks
Hi Edwin, I am getting following error while deploying :
ReplyDelete---------------------------------
[02:31:25 PM] HTTP error code returned [500]
[02:31:25 PM] Error message from server:
Error during composite deployment: oracle.fabric.common.FabricDeploymentException: oracle.fabric.common.FabricException: Deployment Failed: Unable to register service.: Deployment Failed: Unable to register service..
[02:31:25 PM] Check server log for more details.
[02:31:25 PM] #### Deployment incomplete. ####
[02:31:25 PM] Error deploying archive file:/C:/WINDOWS/Oracle/JDev11gWork/MDS/msdpoc1/deploy/sca_msdpoc1_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
---------------------------------
Could you please throw some light on this ?
I have SOA Server and JDev on same machine. Do i still need to run the ant import target ?
Thanks,
Ketan
Hi,
ReplyDeleteCan you take a look at the soa_server1 log , there you can see the real error.
thanks Edwin
Hi Edwin, I had made a mistake in adf-config file. This actually creates a new query..
ReplyDeleteIn the config file, we created two namespaces (1 for soa and 1 for apps)with same metadata-store-usage values but different paths. I actually earlier thought this was a typo. So does this mean that the namespace tag actually only lists the available paths for the artifacts (using the store definitions from later section) and all of these can be accessed using a single prefix mds ?
Also, one more query : on the server, there is option of creating metadata repositories using farm's navigation. How can these be used ?
Thanks,
Ketan
Hi,
ReplyDeletethe namespace tag actually only lists the available paths for the artifacts and all of these can be accessed using a single prefix mds
yes you are right and you can't change apps,this is predefined.
but you can use a different local mds for the apps namespace. what you define in adf-config.xml is only for local validation and compilation. On the server Soa will always use the db repos to find apps/... artifacts.
on the server, there is option of creating metadata repositories using farm's navigation.
Dont know this, can you send me a link where you have seen this
thanks
Hi,
ReplyDeleteOn the soa server side I dont think you can have more 1 MDS repos, check the Soa Mbeans. And replacing it with an File MDS is no option because then versioning of your composites is not possible anymore.
but you can create a new partition like apps , so instead of using apps/xxx you can now use xxx . But you also have to do it locally in adf-config.xml ( add the xxx namespace )
thanks
I'm using jdev 11.1.1.2 and it seems locations for mds libraries used but the ant script has changed. I there any other way to do this?
ReplyDeletehi,
ReplyDeletethis should work http://biemond.blogspot.com/2009/11/soa-suite-11g-mds-deploy-and-removal.html
it works with your version
thanks
Hi Edwin is posible to use this with Business Rule, do you have an example? I need to use a Business independent of the composite and reusable.
ReplyDeleteThanks
i´m sorry for my english.I'm from Argentina.
Hi,
ReplyDeleteI think you can do it when you do it like the soa 10g style and put this file in MDS.
or make a BR Composite and call the BR services from the other composites and you can edit the business rules online in the soa composer.
thanks.
Hi,
ReplyDeleteI was trying to deploy artifacts to DB MDS on server but i do not see any folder in jdeveloper/modules/oracle.adf.share_11.1.1
i mean not even oracle.mds_11.1.1. Why i don;t see them in my local installed SOA11g? Please let me know.
Hello Edwin,
ReplyDeleteThank you for sharing the knowledge, wonderful blog.
I have a problem that I am stuck with.
I have the data in the MDS db repository deployed using a separate application from JDeveloper.
I am trying to deploy a SOA application to the development server using ant script. But it fails with the message:
[scac] Validating composite "C:\working\soa\deployment1\source\TransactionActivityService\NotificationLoggingService/
composite.xml"
[scac] Schema Check ... [+17.0 ms]
[scac] Loading Composite... [+181.3 ms]
[scac] Parse Composite... [+12.7 ms]
[scac] Parse ComponentTypes [+116.3 ms]
[scac] Getting MetaDataManager [+4.7 ms]
[scac] Getting WSDL Manager [+0.1 ms]
[scac] Done with Load Composite [+61.3 ms]
[scac] Loading WSDLs ... [+0.1 ms]
[scac] WSDL [NotificationLoggingService.wsdl]
[scac] WSDL [NotificationLogging.wsdl]
[scac] Validating WSDLs ... [+26.7 ms]
[scac] oracle.fabric.common.wsdl.XSDException: Error loading schema from file:/C:/working/soa/deployment1/source/Tran
sactionActivityService/NotificationLoggingService/NotificationLogging.wsdl [Cause=Error in getting XML input stream: oramds:
/apps/common/xsd/NotificationLoggingService.xsd: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:
/apps/common/xsd/NotificationLoggingService.xsd does not exist.]
I am not deploying the MDS using this script, I am trying to access the data from the DB MDS during the deployment.
Any suggestions in getting past this?
Appreciate your suggestions!
Hi,
ReplyDeletedid you got a error in the jdev ant validation or at deploy time on the soa server.
if it is in jdev you also need to create the common folder in your local mds , see adf-config.xml. it is located in jdeveloper integration seed folder.
or you can change the adf-config.xml so it looks at the DB MDS and not local.
thanks
Hi,
ReplyDeleteThank you for your reply. I get the error in the ant script.
In the build.properties, I have set foreign.mds.type=db
mds.db.userid=DEV_MDS
mds.db.password=soadev
mds.db.jdbc-url=jdbc:oracle:thin:@hostname:1510/SOADEV
And in the build.xml I have the following:
.
.
.
(The following uses the adf-config-db.seed and creates adf-config.xml in the .adf/META-INF directory)
input message="Please enter the password for the MDS schema:"
addproperty="mds.db.password"/>
.
.
.
Then I have a ant target to deploy the project
In this target it fails during the ant-sca-package.xml ant call
My generated adf-config looks like:
Is there a direct way to get the ant to use the mds connection that I created in the ant(createMDSConfigForDB) in build.xml above?
Thank you.
Viji
Hi,
ReplyDeletecan you encode the xml , so I can see it.
thanks
In the build.properties, I have set foreign.mds.type=db
ReplyDeletemds.db.userid=DEV_MDS
mds.db.password=soadev
mds.db.jdbc-url=jdbc:oracle:thin:@hostname:1510/SOADEV
And in the build.xml I have the following:
.
.
.
<condition property="db.based" value="true">
<equals arg1="${foreign.mds.type}" arg2="db"></equals>
</condition>
<condition property="file.based" value="true">
<equals arg1="${foreign.mds.type}" arg2="jdev"></equals>
</condition>
<condition property="server.file.based" value="true">
<equals arg1="${foreign.mds.type}" arg2="server.file"></equals>
</condition>
<target name="ConfigMDSStore"
description="seed the mds connection information based on the properties in build.properties">
<antcall target="createMDSConfigForDB"/>
</target>
<target name="createMDSConfigForDB" if="db.based">
(The following uses the adf-config-db.seed and creates adf-config.xml in the .adf/META-INF directory)
<input message="Please enter the password for the MDS schema:"
addproperty="mds.db.password"/>
<property file="${env.CURRENT_FOLDER}/${applications.properties}"/>
<property name="adf.path" value="${env.CURRENT_FOLDER}/../.adf/META-INF/${adf.config.uri}"/>
<copy file="${env.CURRENT_FOLDER}/../adf-config-db.seed" tofile="${adf.path}" overwrite="true"/>
<replace file="${adf.path}" token="@db.user@"
value="${mds.db.userid}"/>
<replace file="${adf.path}" token="@db.password@"
value="${mds.db.password}"/>
<replace file="${adf.path}" token="@db.connect.string@"
value="${mds.db.jdbc-url}"/>
</target>
.
.
.
Then I have a ant target to deploy the project
<target name="deployProject" depends="ConfigMDSStore">
In this target it fails during the ant-sca-package.xml ant call
<ant antfile="${soa.env}/bin/ant-sca-package.xml" inheritAll="true" target="package">
Hi,
ReplyDeletethis is really old and not so easy , can you use these ANT scripts instead.
http://biemond.blogspot.com/2009/11/soa-suite-11g-mds-deploy-and-removal.html
thanks
I have a separate script to deploy the files to the MDS.
ReplyDeleteI have a SOA application which needs to be deployed and does not require MDS to be redeployed. That is why I am using this script to deploy only the SOA application.
And I am stuck at getting the application deployment to use the MDS connection during the packaging.
The script at http://biemond.blogspot.com/2009/11/soa-suite-11g-mds-deploy-and-removal.html requires the MDS to be deployed as part of the application. Please let me know if thats not the case.
Thank you.
Hi,
ReplyDeletethen do this http://biemond.blogspot.com/2009/09/deploy-soa-suite-11g-composite.html
and disable the MDS in the properties.
thanks
Edwin,
ReplyDeleteGreat post!
It took me some time to find the common-sca-tools.xml. I had to download your script and open the jpr. It would be easy on someone like me to understand how to get to this if you include a comment(or step) to download the scripts from your blog and open the project in JDEV to continue.
Secondly, Why do you have check for a specific ANT version? I had "Apache Ant version 1.7.1 compiled on June 27 2008" and your script failed to validate until I replaced the arg2="Apache Ant version 1.7.0 compiled on December 13 2006" from your script with my exact version of ANT. Is there a better way of checking if Ant 1.7 is available? Thank you.
Hi Edwin,
ReplyDeleteGreat Post . I'm getting an error saying the
C:\Oracle\Middleware\jdeveloper\oracle_common\modules\oracle.mds_11.1.1 not found. Even though my home is properly defined at build.properties file
oracle.home=C:/oracle/Middleware/
local.seed=C:/oracle/Middleware/jdeveloper/integration/seed/
I get this error.
Unable to compile, very new to Java so unable to get this work. Any pointer would be great.
Great Post, It really helped me configuring the MDS.
ReplyDeleteJust have below questions:
- Is it mandatory to have the MDS placed inside
integration/seed/apps ?
cant we have a folder directly like apps/myProjMDS
- We are planning to source control the MDS and deploy from there to server, is this recommended approach.
Thanks
SAM
Hi,
ReplyDeleteyou can add your own apps mds location in the adf-config.xml
add the folder location and inside that a seed folder.
<adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
<mds-config xmlns="http://xmlns.oracle.com/mds/config">
<persistence-config>
<metadata-namespaces>
<namespace metadata-store-usage="mstore-usage_1" path="/apps"/>
<namespace metadata-store-usage="mstore-usage_2" path="/soa/shared"/>
</metadata-namespaces>
<metadata-store-usages>
<metadata-store-usage id="mstore-usage_1">
<metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
<property value="c:/projects/mds" name="metadata-path"/>
<property value="seed" name="partition-name"/>
</metadata-store>
</metadata-store-usage>
<metadata-store-usage id="mstore-usage_2">
<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>
</metadata-store-usages>
</persistence-config>
</mds-config>
</adf-mds-config>
thanks
Hi Edwin,
ReplyDeleteI am using Jdev 11.1.1.3 and when I try to compile the ANT I get the below error.
java] Starting local filesystem import into mds ..
[java] oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document
[java] MDS-01329: unable to load element "persistence-config"
[java] MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid.
[java] MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.
[java] MDS-00003: error connecting to the database
[java] Listener refused the connection with the following error:
[java] ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
[java]
[java] Listener refused the connection with the following error:
[java] ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
[java]
[java] Listener refused the connection with the following error:
[java] ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
[java]
[java]
[java] at oracle.mds.config.PConfig.loadFromBean(PConfig.java:695)
[java] at oracle.mds.config.PConfig.(PConfig.java:504)
[java] at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:692)
[java] at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:749)
[java] at oracle.mds.config.MDSConfig.(MDSConfig.java:500)
[java] at oracle.mds.config.MDSConfig.(MDSConfig.java:430)
[java] at
Total time: 7 seconds
I have checked the DB connection and it works fine. Any inputs on this??
Thanks,
Ab
Hi,
ReplyDeletemaybe there is some mis configuration in the service name or the sid etc or some DNS problem.
did you do something like this http://download.oracle.com/docs/cd/E17904_01/doc.1111/e17361/ch18.htm
thanks.
Hi Edwin,
ReplyDeleteI attended your presentation at ODTUG regarding this. It was very informative, thank you!
I have successfully deployed my WSDL's to my DEV and TEST environments. When I deploy a composite that references one of those WSDL's to my TEST environment, do I need to change the values in the adf-config file to point to TEST? What I'm not sure about is whether the MDS info in the file is simply used to validate at deployment, or if it embeds something in the composite that points to the MDS. What I want to make sure is that my Test composites point to Test WSDL's, not Dev.
Hi,
ReplyDeletethe deployment will remove or ignore your MDS settting what you made in the adf-config.xml
It will always use the MDS database of the SOA Suite.
So don't worry. Just make sure you fill the DEV and TEST MDS.
thanks.
Hi Edwin,
ReplyDeleteThanks for the blog, it has been very useful.
For a given project, I am deploying the WDSL and the XSD to the database MDS. The files are there and look good. In the WSDL, I changed the schemaLocation to point to the XSD in the MDS, rather than the local file.
My adf-config.xml points to the database MDS of my DEV environment. JDEV seems to like the entry as it's not underlined in red. Further, I am able to deploy the composite to my DEV environment without error. However, if I go look at the URL of the concrete WSDL after deployment, the schemaLocation reference to the XSD has changed (it's now incorrect, and the composite will not run).
First question, is what I'm doing allowed? Is it possible to reference the MDS XSD from the WSDL?
Second question, do you know what is causing the schemaLocation in the WSDL to resolve as it is?
Hi Edwin,
ReplyDeleteThanks for the post. I followed the instructions and have succesfully demonstrated reuse of canonical models for simple schemas.
However now that I have loaded in the OAGIS (about 3 meg) xsds library, the scale of if has completely broken JDeveloper(Note that OAGIS contains many interrelated XSDs but none of them are too large individually). Opening an XSD from my Local MDS connection takes about 3 minutes and consumes 1/2Gig. Expanding a node then just kills the machine.
Do you have any common knowledge as to performance limitations or scalability of the Local/Remote MDS approach?
Ben.
Hi,
ReplyDeleteI know the issue.
check if you don't have circular xsd references. but I have the same issue with some AIA xsd's.
Maybe you can check AIA the documentation
thanks
I have a requirement to read Pipe delimited test file and add those entries in DVM file.
ReplyDeleteLater access the dvm file through dvm:lookup in the same SOA project.
Is it possible to create DVM file from SOA Project (programmatically) and access it from the same SOA project to do lookup?
I have tried using Spring context to create the DVM file through Java program. After deploying the SOA project, it creates the file under weblogic root folder which is not accessible by SOA project.
Any one tried this scenario? or any Java Program to push DVM file to SOA-MDS (database)?
Hello Naveen,
DeleteDid You manage to read the DVM from BPEL?
Thank You
Hi Edwin,
ReplyDeleteI am a newbie to Oracle SOA, I am trying to create a composite which reads from an AQ and invoke a OSB proxy service.
I am NOT referring to mds anywhere in my project. For time being i have hardcoded the proxy service wsdl but even then i am getting the below error. I see 2 adf-config files in my project. If i am trying to delete ( from jdev or windows explorer ) one of the files and re-open jdev both of them shows up.
Can you please help me on how to resolve the error.
Here is the error duing deploy :
[10:20:51 PM] Error deploying archive sca_SyncGetService_rev1.0.jar to partition "TestWork" on server soa01 [https://devrdosbap115.dev.nintendo.com:8443]
[10:20:51 PM] HTTP error code returned [500]
[10:20:51 PM] Error message from server:
There was an error deploying the composite on soa01: Deployment Failed: Error in getting XML input stream: oramds:/deployed-composites/TestWork/SyncGetService_rev1.0/SCA-INF/classes/META-INF/adf-config - Copy.xml: Illegal character in path at index 94: oramds:/deployed-composites/TestWork/SyncGetService_rev1.0/SCA-INF/classes/META-INF/adf-config - Copy.xml.
here is my ad-config file :
Hi,
DeleteSOA always needs the default MDS entry to validate all the soa service components.
and can you escape the xml.
thanks
Hi Edwin,
DeleteWe are in a critical issue to use a WSDL, this is giving the below error during compilation though its not in MDS.
Error: oracle.xml.parser.schema.XSDException: Invalid reference: 'http://schemas.datacontract.org/2004/07/Nov.Schema.Interface:AdvancedSearchParamBase' [Cause=Invalid reference: URL:AdvancedSearchParamBase']
Error: Message part "parameters" is undefined [element = {Core.RigDocB2b}AddDocumentLinkSerialNumberResponse
Error: Message part "parameters" is undefined [element = {Core.RigDocB2b}GetBookmarks
Error: Message part "parameters" is undefined [element = {Core.RigDocB2b}AddSerialNumberResponse
Really appreciate for your inputs.
Thanks,
Revathi
Hi, Can you please let me know , how can i escape or change the path of adf-config file. I am still getting the same error.
ReplyDeleteHi,
DeleteI think you can add forward slashes
here an example to add an extra location.
https://github.com/biemond/soa_tools/blob/master/maven_soa_suite_ps5/source2/.adf/META-INF/adf-config.xml
Hi Edwin,
ReplyDeleteThank you for such a useful post!
Can you help me, please! After loading catalog with schemas on MDS I can not see/read it. Only folders' structure. I can read/use only metadata located in "apps" folder.
Thanks!
Hi,
Deletethe apps folder is the only part where you are in control , the rest is restricted and used by soa suite.
Hi Edwin,
ReplyDeleteThanks for your useful post. Quick question,
I tried to create a file based MDS in local machine Oracle/Middleware/Jdeveloper.../seed/scenario
Created a MAR project and imported it successfully into SOA.. so i have now following folder structure
apps
deployed-composites
scenario
soa
And then when I try to deploy a composite with DB config on the adf-config.xml - then it errors(MDS-00054:) for not able to load wsdl from oramds:/scenario.
Is it literally not possible to load any artifacts other than oramds:/apps at all?
What I wonder, when you are able to import /scenario - how come you are not able to access by composites?
Thanks for your time.
Hello Edwin,
ReplyDeleteI have one query which is not exactly related to this port.
One simple question :
Can we access any Shared location of Windows (SMB protocol) from SOA 11g server ?
Regards,
Maulik Shah