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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]