[prev in list] [next in list] [prev in thread] [next in thread] 

List:       muse-dev
Subject:    Documentation is outdated
From:       "=?ISO-8859-1?Q?Jos=E9_Antonio_S=E1nchez?=" <getaceres () gmail ! com>
Date:       2006-12-12 15:33:52
Message-ID: a15f6440612120733y3ff98dc5geda6b36b5988cff8 () mail ! gmail ! com
[Download RAW message or body]

Hello, some documentation is outdated for Muse 2.1. Specially, I'm
trying to send a Notification upon a property change outside of a
SetResourceProperties request. According to the documentation in
http://ws.apache.org/muse/docs/2.1.0/manual/how-to/publish-wsrp-notifications.html
the code I must write is:

import org.apache.muse.ws.resource.properties.*;
import org.apache.muse.ws.resource.properties.listeners.*;

...

//
// in this scenario, we are alerted to a property change
// that occurred outside of WSRP requests, and that alert
// presumably contains the name/value pair for the change
//
QName name = ...;
Object oldValue = ...;
Object newValue = ...;

ResourcePropertyCollection wsrp = getWsResource().getPropertyCollection();
Iterator i = wsrp.getChangeListeners();

while (i.hasNext())
{
    PropertyChangeListener listener = (PropertyChangeListener)i.next();
    listener.propertyChanged(name, oldValue, newValue);
}

But now:

- getChangeListeners() expects a QName (I suppose the desired property name)ˇ
- as a result propertyChanged method doesn't need a name in its first
argument, but it expects two elements (Element classes) as old and new
values.
How can I get an Element value from a property? Until now I was using
the capabilities but now I suppose that I have to get it from the
resource properties docuent in some way (using DOM interface?)

-- 
Saludos.
José Antonio Sánchez

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic