Hi, The WSDM Configuration capability does not define any additional metadata that could be associated with properties or operation - right now it's really just for semantics (so a client can see that your interface makes the resource configurable by a remote client).
The WSDM Metrics capability allows you to add metric metadata to existing resource properties. There is some info on the Metrics capability here: http://ws.apache.org/muse/docs/2.1.0/manual/capabilities/wsdm-metrics.html To clarify the instructions on this page, you can add Metrics support to your resource type using Muse is: 1. Add the Metrics capability to your <resource-type/> in muse.xml: <capability> <capability-uri>http://docs.oasis-open.org/wsdm/muws/capabilities/Metrics</capability-uri> <java-capability-class>org.apache.muse.ws.dm.muws.impl.SimpleMetrics</java-capability-class> </capability> 2. Make sure you have an RMD (metadata) document for your resource properties. You can see an example of RMD usage in the 'wsrf' sample project. 3. The <wsrmd:Property/> elements for the properties that you consider to be metrics needs the following element underneath it: <muws2:Capability xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2">http://docs.oasis-open.org/wsdm/muws/capabilities/Metrics<muws2:Capability> This will tell Muse that the Metrics capability is associated with the property. The Metrics capability will create and maintain all of the metadata for the property (when you update the property, it will set the value of "LastUpdated", etc.). 4. Use the getResourceProperty() method on your generated client to get the property values in XML form. You can then extract the Metrics attributes from them like so: Element[] properties = client.getResourceProperty(new QName("MyPropertyName")); for (int n = 0; n < properties.length; ++n) { String updateTime = properties[n].getAttribute("LastUpdated"); System.out.println("Last updated on: " + updateTime); } Admittedly, Muse could have a more convenient way of getting the properties and the metric metadata at the same time (in this system, you can't use getPropertyAsObject() to get the property values as POJOs - you have to get them as XML first). I will create JIRA item for this. I will also add the above info to the Metrics capability documentation. Dan "Christoph Bernhard Schwarz" <[EMAIL PROTECTED]> wrote on 02/25/2007 07:11:40 AM: > hi! > > as far as i understood the standard, metrics and configurations are > specialized resource properties. how do i specify a resource property to be > a metric or configuration in the wsdl file that is used for code generation? > and how do i access the meta-information that is attached to a metric (e.g. > lastupdated) from the client side proxy? > > any help appreciated, > christoph --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
