Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » COSMOS » help with MDR creation
help with MDR creation [message #571418] Fri, 27 June 2008 01:00
Nithya is currently offline NithyaFriend
Messages: 10
Registered: July 2009
Junior Member
Hello Ali,

Thank you so much for your help, we were able to successfully create a
CMDBf layer on our mdr using COSMOS framework. Now we can send a CMDBf
query to our MDR and get back the correct CMDBf query result.

We now want to use COSMOS framework for making our MDR discoverable using
an end point reference. I went through the sample MDR module, but I am
unclear on how to deploy it in a web server.

As far as I have understand, just like the sample XML repository helped in
building the cmdbf layer for our mdr, we must be able to use the Example
MDR modules and customize it to deploy our MDR instead of starting from

I do not have much idea on how to actually launch the exampleMDR as a
discoverable service and view it with browser (like cosmos demo
application), could you please help us on the deployment/ configuration
procedures needed for this? References to any related documents for better
understanding would be really helpful.

------------------------------------------------------------ ------------------

Hi Hanu,

a) IItemConstraintHandler is a generic interface used for all constraints
associated with item templates (e.g. instance id handler, record type
handler, and etc...). If you look at IdHandler,
you'll notice that it extends AbstractItemConstraintHandler, which
implements IItemConstraintHandler.

b) That depends on the type of constraints your MDR will support.

To support item templates you need to implement: IItemTemplateHandler (or
optionally extend AbstractItemTemplateHandler)

For each item constraints (i.e. Instance id, record type, property value,
and XPath), you need to implement IItemConstraintHandler (or optionally
extend AbstractItemConstraintHandler)

To support relationship templates you need to implement:

For each relationship constraint (i.e. Instance id, record type, property
value, and XPath), you need to implement IRelationshipConstraintHandler
optionally extend AbstractRelationshipConstraintHandler)

c) The default implementation of the CMDBf query engine, invokes
IRelationshipTemplateHandler.execute(...) for each item in the source and
target item template. If there are multiple relationships, then you're
template handlers will be invoked multiple times based on the entries of
source and target item templates.

Is there any way to extend the example to cover most traversed paths to
help newbies like myself?

In most cases, yes.

Based on my assessment, we can reuse and the following
classes in

a) We need to write classes similar to the classes mentioned in this

b) We need to add another class

Ideally you want to reuse as much code as possible under the plug-in: and make your MDR based on a revision

I'm posting this e-mail thread to the newsgroup so it can benefit others.

To learn how to access COSMOS newsgroup, click on the 'newsgroup' link
COSMOS main web page. We can continue the discussion from there.

Thanks and good luck,

============================================================ ======

Hi Ali,

Overall, we are very impressed with COSMOS initiative and commitment of

Thanks for the prompt and detailed response.

I have the following questions:

a) There seem to be no sample code for implementing IItemConstraintHandler
in the Sample Query Service. Is there sample code that we can look at?

b) What are the generic interfaces that all our Domain Objects must

By looking at the code, it appears that if Our Domain Objects implement
IItemConvertible, IXMLWritable, would the framework automatically take
of conversions?

c) It is unclear how to implement RelationShipTemplate in a generic way?
instance, if we have to support multiple relationships, how does the code
look like?

Is there any way to extend the example to cover most traversed paths to
newbies like myself?

I am beginning to figure out exposing our proprietary data in such a way
that it can be adopted easily into COSMOS framework.

Based on my assessment, we can reuse and the following
classes in

a) We need to write classes similar to the classes mentioned in this

b) We need to add another class

We would greatly appreciate any guidance on this regard.

Thanks in advance,


============================================================ ======

Hi Hanu,

Here are a few recommendations:

1) If you're not already familiar with CMDBf, you can read the standard

2) Even though the following document is a bit outdated, it still will
you a good overview of the CMDBf framework: tion_Service
This document will describe how you can use COSMOS' APIs to provide CMDBf
services (i.e. query/registration).

3) In i10 we transitioned from the OSGi platform to web services. An MDR
i10 is a web service running on the Axis2 engine. The student/teacher
sample is your best point of reference to determine how all pieces of
works. The sample is composed of two parts:

a) The CMDBf implementation of the services

b) Wrapping to package the sample as an MDR (i.e. a web service)

The code for the first part can be retrieved from COSMOS CVS under:

org.eclipse.cosmos/examples/org.eclipse.cosmos.samples.cmdbf .services

The second part can be retrieved from:

org.eclipse.cosmos/examples/org.eclipse.cosmos.example.mdr.w s contains an implementation of a
record type constraint:

For the overall flow of the query operation, see
CMDBfQueryOperation.execute(Object) under
The plug-in can be retrieved under the following CVS module:
org.eclipse.cosmos/data-collection. Notice the result is suppressed in
last step (i.e. step 4: processContentSelectors (queryResult,

We are working towards solidifying our documentation and sample set.

Let us know if you have any other questions.


Ali Mehregani

Phone Number: (905) 413-3712

Service Modeling Language - COSMOS



I am beginning to develop an MDR for exposing Qualcomm properitary
provisioning system based on COSMOS framework. I am looking at the code
written by you in Samples project.

While I understand overall flow, I am not quite clear on how to implement
record constraints and how the filtering happens based on 'SuppressResult'

Is there a generic example which would cover all features of Graph Query

I have internally championed that COSMOS framework is the Best Approach
got approval to build a MDR. I need all the guidance that I can get to
forward on this.

I am looking to get direction and help.

I would greatly appreciate it if you can give me guidance and necessary
pointers in this respect.

BTW, Are there any training sessions going to be held for Developers Like
adopt COSMOS framework? If so, when and where?

Thanks in advance,

Previous Topic:Validating test SML-IF documents
Next Topic:help with MDR creation
Goto Forum:

Current Time: Wed May 24 17:51:30 GMT 2017

Powered by FUDForum. Page generated in 0.03337 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software