You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by Hariharan L Narayanan <ha...@in.ibm.com> on 2007/09/04 12:23:13 UTC

Way to get meta data of a property

Hi,
Is there any way to get the RMD contents like the way we have for 
retrieving WSDL? 
If I have a few properties and in that  one or two is for Metrics, then 
how can I get those properties alone that are for metrics?

Please help me out get this done.

Regards,
Hariharan L Narayanan 
System Software Engineer
India Software Labs
IBM India (P) Ltd
Ph:(080) 41055498

Re: Way to get meta data of a property

Posted by Bogdan Solomon <bs...@ncct.uottawa.ca>.
If you are trying to get the Metadata from a client, you need to do the
following.

1. Modify your muse.xml to use
org.apache.muse.ws.resource.metadata.ext.WsrfMetadataExchange instead of
org.apache.muse.ws.metadata.impl.SimpleMetadataExchange for the following
capability http://schemas.xmlsoap.org/ws/2004/09/mex

2. Then you can use the
org.apache.muse.ws.resource.metadata.ext.WsrfMetadataExchangeClient in your
client code to retrieve the whole RMD like you do the WSDL using the
getRMD()  method. Both those classes can be found under
muse-wsrf-rmd-2.2.0.jar

2.1 If you want you can use a normal Metadata client but request the
appropriate namespace (which is defined in the WsrmdConstants.NAMESPACE_URI
property.



Hariharan L Narayanan wrote:
> 
> Hi,
> Is there any way to get the RMD contents like the way we have for 
> retrieving WSDL? 
> If I have a few properties and in that  one or two is for Metrics, then 
> how can I get those properties alone that are for metrics?
> 
> Please help me out get this done.
> 
> Regards,
> Hariharan L Narayanan 
> System Software Engineer
> India Software Labs
> IBM India (P) Ltd
> Ph:(080) 41055498
> 

-- 
View this message in context: http://www.nabble.com/Way-to-get-meta-data-of-a-property-tf4376828.html#a12482873
Sent from the Muse - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


Re: Way to get meta data of a property

Posted by rl...@xecu.net.
If I understand the question, you can access RMD contents from your code
using something similar to:

        ...

        // get property collection for this resource
        WsResource resource = getWsResource();
        ResourcePropertyCollection props = resource.getPropertyCollection();

        // get the resource metadata descriptor
        MetadataDescriptor metadata = props.getMetadata();

        // if there's a TopicExpression property
        if (metadata.hasProperty(WsnConstants.TOPIC_EXPRESSION_QNAME)) {
            // loop over all topic expression values
            Iterator i = metadata.getStaticValues(
                    WsnConstants.TOPIC_EXPRESSION_QNAME).iterator();

        ...


> Hi,
> Is there any way to get the RMD contents like the way we have for
> retrieving WSDL?
> If I have a few properties and in that  one or two is for Metrics, then
> how can I get those properties alone that are for metrics?
>
> Please help me out get this done.
>
> Regards,
> Hariharan L Narayanan
> System Software Engineer
> India Software Labs
> IBM India (P) Ltd
> Ph:(080) 41055498



---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org