The MDS (Metadata Services) is a repository used by several Oracle Fusion Middleware products. For Oracle SOA Suite 11g, artifacts such as schemas and WSDLs are maintained in the MDS.
How do you reference schemas and WSDLs in the MDS?
In your SOA code, if you want to import a schema from the MDS, you would do this:
What's the problem?
ORAMDS references only work for SOA Suite 11g code. Some products which cannot take advantage of the MDS (e.g., OSB) may still want to reference these shared schemas or WSDLs.
How do you reference schemas and WSDLs in the MDS via HTTP?
If you want to reference the same schema as an HTTP reference instead of an ORAMDS reference, do the following:
Applicable Versions:
How do you reference schemas and WSDLs in the MDS?
In your SOA code, if you want to import a schema from the MDS, you would do this:
<xsd:import schemaLocation="oramds:/apps/AIAMetaData/AIAComponents/hello.xsd"/>This is an ORAMDS reference. SOA code no longer has to care which server this schema resides on. The schema hello.xsd thus exists in the MDS under the internal path /apps/AIAMetaData/AIAComponents.
What's the problem?
ORAMDS references only work for SOA Suite 11g code. Some products which cannot take advantage of the MDS (e.g., OSB) may still want to reference these shared schemas or WSDLs.
How do you reference schemas and WSDLs in the MDS via HTTP?
If you want to reference the same schema as an HTTP reference instead of an ORAMDS reference, do the following:
<xsd:import schemaLocation="http://soahost1:8001/soa-infra/services/default/HelloWorld/apps/AIAMetaData/AIAComponents/hello.xsd"/>If you notice in the URL above, the format is as follows:
<xsd:import schemaLocation="http://host:port/soa-infra/services/partition/composite/full_path_in_MDS_to_file"/>Technically, the partition and composite name can be any partition and any composite name, as long as they exist. For example, we can reference this schema in any of these ways, as long as those partitions and composites exist:
<xsd:import schemaLocation="http://soahost1:8001/soa-infra/services/default/HelloWorld/apps/AIAMetaData/AIAComponents/hello.xsd"/>
<xsd:import schemaLocation="http://soahost1:8001/soa-infra/services/default/HelloWorld2/apps/AIAMetaData/AIAComponents/hello.xsd"/>
<xsd:import schemaLocation="http://soahost1:8001/soa-infra/services/Orders/CreateOrder/apps/AIAMetaData/AIAComponents/hello.xsd"/>
Applicable Versions:
- Oracle SOA Suite 11g (11.1.1.x)
11 comments:
Hi,
Great post. Do you think that referencing from OSB through http://.. has any performance downgrades?
We need to take some decision regarding using DVM's in OSB11g and need to know what would be best approach?
Thanks,
A
(1) No, there should be no impact on performance when referencing or importing schemas and WDLS via HTTP. In fact, this is quite common so don't be too concerned.
(2) OSB does not support MDS usage, and hence does not support DVM lookups. So unfortunately there is no recommended approach.
One option is to reverse engineer the DVM classes from 'soa-xpath-exts.jar' and create your own custom XPath functions to implement comparable functionality. Another option is to duplicate your DVM data in database tables and perform database lookups. Or check out this blog for a third option: https://blogs.oracle.com/christomkins/entry/domain_value_maps_in_oracle_se
Unfortunately, the lack of DVM support from within OSB is a common problem most customers are complaining about, so you're not alone.
Approach is good. But we tried this and found a couple of limitations
1> When doing deploy of composites, you need the 'named' composite to be already deployed.
2) When starting the server you can not control the order in which composites are loaded, therefore if the named composite has not loaded, then other processes will not load successfully.
You are correct on both counts.
Therefore, within the same Oracle SOA Suite 11g infrastructure, you should always reference the MDS (via ORAMDS lookups) when importing/referencing schemas and WSDLs.
However, for other external non-SOA Suite systems and services that require access to your MDS schemas, this may be an approach to consider.
Thanks!
Hi,
Thank you for your answer.
Do you have any idea what would be best approach to store common artifacts in order for OSB to be able to reference them? We also have here OSR licence ...
Regarding DVM i have build a custom xpath function(something like dvm:lookup) in OSB which is running xquery against mds http location.
Thanks,
A
Hi,
Can we add tables to the MDS DB?
Thanks
Bhagya
Bhagya,
Yes, you can create any custom table you want in the MDS schema in the database. It's just a regular database schema.
Typically, Oracle will state that they don't recommend it due to concern that heavy activity on your custom table may impact product performance.
I don't know if this is the answer you're looking for.
Augustin,
The official position from Oracle is that OSB 11g does not support the MDS. Future releases will be supported through.
Thus, you will have to get creative in how/where you want to store and access your common artifacts.
My suggestion is to forget OSR, and continue doing your DVM lookup workaround.
Hi Ahmed,
Yes we forget about OSR and been creative . Actually i have retrived dvm files with mds api and have applied an xquery function against the stream.
It work quite ok.
Thank you!
Augustin
We tried to refer the XSD in SOA MDS from WSDL in OSB but getting the error as "depency mapping is not configured in WSDL resource".
Actuall in OSB it allows refer the artifacts only with OSB not outside. In browse button, for refering the depencies it does not allow to refer the URL.
Please help implement the above approach in OSB. As we tried but it is failing.
THanks,
Vinoth
Hi,
We do not deploy the MDS artifacts as a part of composites. Instead, we deploy MDS artifacts as soa bundle. So my question is, what would be the url of mds artifacts deployed as soa bundle instead of composites? the format you have mentioned needs composite information.
I need this as i need the url of dvm located in mds, which can be used in ODI xml data server.
Post a Comment