Thanks Dan for addressing my issue.
 My client (notification consumer) is a normal WSDM compliant Web Service exposing single resource.I have attached the wsdl for it.
  I am using filesystem example , which creates two topics for the Operational Status property :
 
1) ManagementEventTopic  with Topic name OperationalStatusCapability. I have attached the subscription request for this topic as ManagementEventSubscription. But if the client subscribes for this topic then it is not able to receive notifications(notify method is not getting invoked) on sending mount/unmount requests :-(
 
2)ResourcePropertyValueChangeTopic with Topic Name OperationalStatus.I have attached the subcription request for this topic as ValueChangeSubscripton. To publish notification events through this topic, I have made the changes in the updateOperationalStatus method (in FileSystemService Calass) as I mentioned in my previous mail. Now if the same consumer subscribes for this Topic then it is able to get back the notifications(notify method is getting invoked :-)
 
I am sure that both the subscriptions are working fine as there are no faults received. I am receiving back the MessageID on subscription successfully.
 
 There are no errors while publishing the notifications in either case, but unfortunately while publishing these notifications via ManagementEventTopic the notify method of consumer is not getting triggered. However, when consumer sends the request for GetCurrentMessage to get the last notification, it receives the notification response as expected(wrapped within ManagementEvent). The problem is that this notification is not being sent automatically as was the case with ResourcePropertyValueChangeEvent. I have attached the response for GetCurrentMessage under GetCurrentMessageResponse.
 
Please me help out of this problem..
Let me know in case you require anything else from me...
 
-Regards
Pushkar


On 7/6/06, Daniel Jemiolo <[EMAIL PROTECTED]> wrote:
Are you certain the client is sending the right topic _expression_? Are the
subscriptions working and the notifications failing, or is the
subscription failing early and then the side effect is no notifications?
Can you send your client code for subscribing so we can eliminate that as
a possible error?

thanks,
Dan



"Pushkar Sachdeva" < [EMAIL PROTECTED]> wrote on 07/06/2006
10:48:26 AM:

> Thanks for your reply Balan.
> I tried a lot, still i am not able to get notification events on
consumer
> side for *ManagementEventTopics*. Please direct me if there is any
sample
> code showing its implementation. I already tried the *filesystem* and *
> enterprise* example that comes along with muse1.0.
>
> In filesystem example, the code provieded for publishing via
> ManagementEventTopic is as follows:
>
>   public void updateOperationalStatus(
> org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2 .
> OperationalStatusDocument.OperationalStatus.EnumnewStatus)
>     {
> org.apache.ws.notification.base.NotificationProducerResourceresource = (
>
org.apache.ws.notification.base.NotificationProducerResource )getResource();
>         org.apache.ws.resource.properties.ResourceProperty statusProp =
> resource.getResourcePropertySet().get(
> FilesystemPropertyQNames.OPERATIONALSTATUS);
>
> org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2 .
> OperationalStatusDocument.OperationalStatuscurrentStatus
> = (
> org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.
> OperationalStatusDocument.OperationalStatus)
> statusProp.get(0);
>         if (!currentStatus.enumValue().equals(newStatus))
>         {
>             org.apache.xmlbeans.XmlObject oldStatus =
> org.apache.ws.util.XmlBeanUtils.copyXmlBean(currentStatus);
>             currentStatus.set(newStatus);
> *            org.apache.ws.notification.topics.TopicSpace muwsTopicSpace
=
> resource.getTopicSpaceSet().getTopicSpace(
> org.apache.ws.muws.v1_0.MuwsConstants.NSURI_MUWS_PART2_TOPICS );
>
>
org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImplstatusTopic
> = (
> org.apache.ws.muws.v1_0.topics.impl.XmlBeansManagementEventTopicImpl)
> muwsTopicSpace.getTopic (
>
org.apache.ws.muws.v1_0.capability.OperationalStatusCapability.TOPIC_NAME);
>
>
org.apache.ws.resource.properties.ResourcePropertyValueChangeEventstatusChangeEvent
> = new
> org.apache.ws.resource.properties.v2004_06.impl .
> XmlBeansResourcePropertyValueChangeEvent(new
> Object[]{oldStatus}, new Object[]{currentStatus});
>             statusTopic.propertyChanged(statusChangeEvent);  // publish
the
> event
> *        }
>         return;
>     }
>
>
> But the consumer subscribed for OperationalStatusCapability is not
getting
> notifications i.e  the notify method on consumer is not getting invoked.
>
> So i tried using the ReqourcePropertyValueChangeTopic and made the
following
> changes.
>
>
>     public void updateOperationalStatus(
> org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2 .
> OperationalStatusDocument.OperationalStatus.EnumnewStatus)
>     {
>      System.out.println("UPDATING OPERATIONAL STATUS");
> org.apache.ws.notification.base.NotificationProducerResourceresource = (
>
org.apache.ws.notification.base.NotificationProducerResource)getResource();
>         org.apache.ws.resource.properties.ResourceProperty statusProp =
> ((FilesystemResource)getResource()).getResourcePropertySet().get(
> FilesystemPropertyQNames.OPERATIONALSTATUS);
>
> org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.
> OperationalStatusDocument.OperationalStatuscurrentStatus
> = (
> org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2 .
> OperationalStatusDocument.OperationalStatus)
> statusProp.get(0);
>         if (!currentStatus.enumValue().equals(newStatus))
>         {
>             org.apache.xmlbeans.XmlObject oldStatus =
> org.apache.ws.util.XmlBeanUtils.copyXmlBean(currentStatus);
>             currentStatus.set(newStatus);
>
>  *           org.apache.ws.notification.topics.TopicSpace muwsTopicSpace
=
> resource.getTopicSpaceSet().getTopicSpace(statusProp.getMetaData
> ().getName().getNamespaceURI());
>
>
org.apache.ws.notification.topics.ResourcePropertyValueChangeTopicvalueChangeTopic=(
> org.apache.ws.notification.topics.ResourcePropertyValueChangeTopic
> )muwsTopicSpace.getTopic("OperationalStatus");
>
>
org.apache.ws.resource.properties.ResourcePropertyValueChangeEventstatusChangeEvent
> = new
> org.apache.ws.resource.properties.v2004_06.impl .
> XmlBeansResourcePropertyValueChangeEvent(new
> Object[]{oldStatus}, new Object[]{currentStatus});
>
>             valueChangeTopic.propertyChanged(statusChangeEvent);  //
publish
> the event
> *        }
>
>         return;
>     }
>
> It worked. The consumer subscribing for OperationalStatus Topic is able
to
> get the notification events. But I think it may not be the clean way to
do
> things, how can I make use of MUWS defined Management Event
CapabilityTopics
> for acheiving this??
>
> Please help.. I appreciate your help in this matter.
>
>
>
>
>
>
> On 6/28/06, Balan Subramanian <[EMAIL PROTECTED]> wrote:
> >
> > Hi Pushkar,
> > I hope I understood your question properly.....
> > The ResourcePropertyValueChangeTopic is used to publish notifications
> > about property changes among the resource properties defined for that
> > resource. Each notification carries the new value of the property and
may
> > carry the old value of the property as well. This is particularly
useful
> > in monitoring scenarios. These events are described in the WS-RP
> > specifications.
> >
> > The ManagementEventTopic is used to publish notifications of WSDM
events
> > in the WSDM Event Format. The format is specificed in the muws-1 spec.
> > Typically these would be events that are generated by the resource
other
> > than property change notifications for example, a heart beat sent by a
> > resource.
> >
> > I am not sure why you cannot get the ManagementEvents in the notify
method
> > if you are subscribed to the topic properly. I'll try out some samples
> > today but maybe someone has an answer to that already.
> >
> > Thanks,
> > Balan
> >
> > Balan Subramanian
> > Autonomic Computing, IBM, RTP, NC
> > 919.543.0197 | [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
> > "Pushkar Sachdeva" <[EMAIL PROTECTED]>
> > 06/28/2006 09:50 AM
> > Please respond to
> > [email protected]
> >
> >
> > To
> > [email protected]
> > cc
> >
> > Subject
> > Help regarding muse notifications
> >
> >
> >
> >
> >
> >
> > I am new to using notifications in muse. I have the following
queries:-
> >
> > 1) What is the difference between *ResourcePropertyValueChangeTopic*
and *
> > ManagementEventTopic* ??
> >
> > 2) If in the Notification Producer,
> > *ResourcePropertyValueChangeTopic*sends
> > *ResourcePropertyValueChangeEvent* then that notification can be
obtained
> > in
> > the notify function of Notification Consumer, but on the other hand If
*
> > ManagementEventTopic* sends the *ResourcePropertyValueChangeEvent*
then
> > the
> > notification is not automatically received in the notify function of
the
> > Notification Consumer. However, in the latter case, Consumer can
obtain
> > the
> > notification sent through *getCurrentMessage* request. How can i
obtain
> > this
> > notification triggered by  *ManagementEventTopic* automatically
without
> > actually sending the request(the same way I obtained through *
> > ResourcePropertyValueChangeTopic*) ??
> >
> > Please help me answer these questions or atleast direct me from where
I
> > could clear my doubts.
> >
> > Thanks a lot in advance.
> >
> > -Regards
> > Pushkar
> >
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


<?xml version="1.0"?>

<definitions name="NotifConsumer"
             targetNamespace="http://ws.apache.org/resource/example/NotifConsumer";
             xmlns="http://schemas.xmlsoap.org/wsdl/";
             xmlns:tns="http://ws.apache.org/resource/example/NotifConsumer";
             xmlns:xsd="http://www.w3.org/2001/XMLSchema";
             xmlns:muws-xs1="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd"; 
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
             xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd";
             xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl";
             xmlns:wsrlw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl";
             xmlns:wsntw="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl";
             xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex";
             xmlns:wsa04="http://schemas.xmlsoap.org/ws/2004/08/addressing";>

   <import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl";
           location="../spec/wsrf/WS-ResourceProperties-1_2-Draft_01.wsdl"/>

   <import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl";
           location="../spec/wsrf/WS-ResourceLifetime-1_2-Draft_01.wsdl"/>

   <import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"; 
           location="../spec/wsn/WS-BaseNotification-1_2-Draft_01.wsdl"/>
   <import namespace="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd";
           location="../spec/wsdm/MUWS-Part1-1_0.xsd"/>
   <types>
      <schema elementFormDefault="qualified"
              targetNamespace="http://ws.apache.org/resource/example/NotifConsumer";
              xmlns="http://www.w3.org/2001/XMLSchema";
              xmlns:xsd="http://www.w3.org/2001/XMLSchema";
              xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd";
              xmlns:wsbf="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd";
              xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd";>

         <xsd:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd";
                     schemaLocation="../spec/wsrf/WS-BaseFaults-1_2-Draft_01.xsd"/>

         <xsd:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd";
                     schemaLocation="../spec/wsrf/WS-ResourceLifetime-1_2-Draft_01.xsd"/>
          <xsd:import namespace="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd"; 
                     schemaLocation="../spec/wsdm/MUWS-Part1-1_0.xsd"/>

         <xsd:import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"; 
                     schemaLocation="../spec/wsn/WS-BaseNotification-1_2-Draft_01.xsd"/>

         <xsd:complexType name="LastMessageType">
            <xsd:sequence>
               <xsd:element name="Occurred"
                  type="xsd:dateTime"/>
               <xsd:element name="Notification"
                  type="xsd:anyType"/>               
            </xsd:sequence>
         </xsd:complexType>         
         
         <element name="LastMessage" type="tns:LastMessageType" />
         
         <!-- Resource Properties Document Schema -->        
         <element name="ConsumerResourceProperties">
            <complexType>
               <sequence>
               <element ref="muws-xs1:ResourceId"/>
                  <element ref="tns:LastMessage" />                                    
               </sequence>
            </complexType>
         </element>

         
      </schema>
   </types>   
   
   <portType name="ConsumerPortType" wsrp:ResourceProperties="tns:ConsumerResourceProperties">
         
      <operation name="GetResourceProperty">
         <input name="GetResourcePropertyRequest" message="wsrpw:GetResourcePropertyRequest"/>
         <output name="GetResourcePropertyResponse" message="wsrpw:GetResourcePropertyResponse"/>
         <fault name="ResourceUnknownFault" message="wsrpw:ResourceUnknownFault"/>
         <fault name="InvalidResourcePropertyQNameFault" message="wsrpw:InvalidResourcePropertyQNameFault"/>
      </operation>


      <operation name="Notify">
         <input name="Notify" message="wsntw:Notify"/>
      </operation>
        
   
   </portType>

   <binding name="MySoapHttpBinding" type="tns:ConsumerPortType">

      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
   
      <operation name="GetResourceProperty">
         <soap:operation style="document"/>
         <input>
            <soap:body use="literal"/>
         </input>
         <output>
            <soap:body use="literal"/>
         </output>
         <fault name="ResourceUnknownFault">
            <soap:fault name="ResourceUnknownFault" use="literal"/>
         </fault>
         <fault name="InvalidResourcePropertyQNameFault">
            <soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
         </fault>
      </operation>

      <operation name="Notify">
         <soap:operation style="document"/>      
         <input>
            <soap:body use="literal"/>         
         </input>
      </operation>
          

   </binding>

   <service name="ConsumerService">
      <!-- Note: the port name becomes the service name in the wsdd generated by Wsdl2Java -->
      <!-- *** Change the port name and the soap:address location below to reflect the desired endpoint URL *** -->
      <port name="consumer" binding="tns:MySoapHttpBinding">
         <soap:address location="http://localhost:8080/wsrf/services/consumer"; />
      </port>
   </service>

</definitions>


<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"; 
          xmlns:fs="http://ws.apache.org/resource/example/filesystem";
          xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing";
          
xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd";
          
xmlns:muws-p2-xs="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd";>

   <Header>
      <wsa:To 
mustUnderstand="1">http://localhost:8080/muse/services/filesystem</wsa:To>
      <wsa:Action 
mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
      <fs:ResourceIdentifier 
mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceIdentifier>
   </Header>

   <Body>
      <wsnt:Subscribe>
                                  
         <wsnt:ConsumerReference>
              <add:Address 
xmlns:add="http://schemas.xmlsoap.org/ws/2003/03/addressing";>http://localhost:8080/muse/services/consumer</add:Address>
                      
         </wsnt:ConsumerReference>
         
         <wsnt:TopicExpression 
xmlns:wsdm="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2-events.xml";
 
Dialect="http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple";>wsdm:OperationalStatusCapability</wsnt:TopicExpression>
         
         <wsnt:UseNotify>true</wsnt:UseNotify> 
         
      </wsnt:Subscribe>
   </Body>

</Envelope>

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/";
 
xmlns:muws-p2-xs="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd";>

  <Header>
    <add:To 
xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing";>http://localhost:8080/muse/services/filesystem</add:To>
    <add:Action 
xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing";>http://ws.apache.org/resource/example/filesystem/FileSystemPortType/SubscribeRequest</add:Action>
    <svr:ResourceIdentifier 
xmlns:svr="http://ws.apache.org/resource/example/filesystem"; 
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing";>/dev/vg00/lvol1</svr:ResourceIdentifier>
  </Header>
  <Body>
    <wsn:Subscribe 
xmlns:wsn="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd";>
      <wsn:ConsumerReference>
        <add:Address 
xmlns:add="http://schemas.xmlsoap.org/ws/2003/03/addressing";>http://localhost:8080/muse/services/consumer</add:Address>
      </wsn:ConsumerReference>
      <wsn:TopicExpression 
xmlns:wsdm="http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2-events.xml";
 
xmlns:wsn="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd";
 
Dialect="http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple";>muws-p2-xs:OperationalStatus</wsn:TopicExpression>
      <wsn:UseNotify>true</wsn:UseNotify>
    </wsn:Subscribe>
  </Body>
</Envelope>
     [echo] ========================== RESPONSE for 
GetCurrentMessage============================
     
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soape
nv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001
/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:wsa="htt
p://schemas.xmlsoap.org/ws/2004/03/addressing">
<soapenv:Header>
<wsa:MessageID soapenv:mustUnderstand="0">uuid:c8f01820-0d7e-11db
-a61f-bff5a526b818</wsa:MessageID>
<wsa:To soapenv:mustUnderstand="0">http://schemas.xmlsoap.org/ws/
2004/03/addressing/role/anonymous</wsa:To>
<wsa:Action soapenv:mustUnderstand="0">http://ws.apache.org/resou
rce/example/filesystem/FileSystemPortType/yourWsdlRequestNameResponse</wsa:Actio
n>
<wsa:From soapenv:mustUnderstand="0">
<wsa:Address>http://localhost:8080/muse/services/filesystem</wsa
:Address>
<wsa:ReferenceProperties>
<ns1:ResourceIdentifier mustUnderstand="1" xmlns:ns1="http://ws
.apache.org/resource/example/filesystem">/dev/vg00/lvol1</ns1:ResourceIdentifier
>
</wsa:ReferenceProperties>
</wsa:From>
</soapenv:Header>
<soapenv:Body>
<wsn:GetCurrentMessageResponse xmlns:wsn="http://docs.oasis-open.
org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd">
<wsdm:ManagementEvent xmlns:wsdm="http://docs.oasis-open.org/wsd
m/2004/12/muws/wsdm-muws-part1.xsd" ReportTime="2006-07-07T11:36:33.343+05:30">
<wsdm:EventId>08314ed6-1eb0-43fb-a5f4-98b1fa4e3809</wsdm:EventI
d>
<wsdm:SourceComponent/>
<wsdm:ReporterComponent/>
<wsdm:Situation xmlns:wsdm="http://docs.oasis-open.org/wsdm/200
4/12/muws/wsdm-muws-part2.xsd">
<wsdm:SituationCategory>
<muws-p2-xs:OtherSituation xmlns:muws-p2-xs="http://docs.oasi
s-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd"/>
</wsdm:SituationCategory>
</wsdm:Situation>
<wsrf:ResourcePropertyValueChangeNotification xmlns:wsrf="http:
//docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd">

<wsrf:OldValue>
<wsdm:OperationalStatus xmlns:wsdm="http://docs.oasis-open.or
g/wsdm/2004/12/muws/wsdm-muws-part2.xsd">Available</wsdm:OperationalStatus>
</wsrf:OldValue>
<wsrf:NewValue>
<wsdm:OperationalStatus xmlns:wsdm="http://docs.oasis-open.or
g/wsdm/2004/12/muws/wsdm-muws-part2.xsd">Unavailable</wsdm:OperationalStatus>
</wsrf:NewValue>
</wsrf:ResourcePropertyValueChangeNotification>
</wsdm:ManagementEvent>
</wsn:GetCurrentMessageResponse>
</soapenv:Body>
</soapenv:Envelope>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to