Not completely. It seems that bug doesn't affect getting notifications from resource properties changes but only with custom topics.
On 12/15/06, Daniel Jemiolo <[EMAIL PROTECTED]> wrote:
Looks like the response is being sent back without a <wsnt:NotificationMessage/> element wrapping the message content. That's what's causing the parsing error. I'll open a JIRA item for this. Also - does this mean you're getting past the previous error with GetCurrentMessage requests? thanks, Dan "José Antonio Sánchez" <[EMAIL PROTECTED]> wrote on 12/14/2006 06:04:37 AM: > Hello, I try to get a produced notification of a changed resource > property value through the getCurrentMessage operation. This is part > of the code: > > ................. > proxy.setTrace(true); > proxy.subscribe(ref, null, null); > ................ > <<change operational status>> > ................ > NotificationMessage message = > proxy.getCurrentMessage(MuwsConstants.OP_STATUS_QNAME); > System.out.println(message.getProducerReference().toString()); > ................ > > This is the SOAP request: > > <?xml version="1.0" encoding="UTF-8"?> > <soap:Envelope > xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> > <soap:Header> > <wsa:To > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://adapt20.ls.fi.upm.es: > 8081/TransFSService/services/TransFS</wsa:To> > <wsa:Action > xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open. > org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</wsa:Action> > <wsa:MessageID > xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:f4ac248b-0be8-9a77-a6e9- > fae611b631bf</wsa:MessageID> > <wsa:From > xmlns:wsa="http://www.w3.org/2005/08/addressing"> > > <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address> > </wsa:From> > </soap:Header> > <soap:Body> > <wsnt:GetCurrentMessage > xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" > xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd">muws2: > OperationalStatus</wsnt:GetCurrentMessage> > </soap:Body> > </soap:Envelope> > > And this is the response: > > <?xml version='1.0' encoding='UTF-8'?> > <soapenv:Envelope > xmlns:wsa="http://www.w3.org/2005/08/addressing" > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > <soapenv:Header> > <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To> > <wsa:ReplyTo> > > <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address> > </wsa:ReplyTo> > <wsa:MessageID>urn:uuid:DB6F8C67C2F4F16B2D116609379875611</wsa:MessageID> > <wsa:Action>http://docs.oasis-open. > org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</wsa:Action> > <wsa:RelatesTo > wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply">uuid: > f4ac248b-0be8-9a77-a6e9-fae611b631bf</wsa:RelatesTo> > </soapenv:Header> > <soapenv:Body> > <muse-op:GetCurrentMessageResponse > xmlns:tns="http://axis2.platform.core.muse.apache.org" > xmlns:muse-wsa="http://ws.apache.org/muse/addressing" > xmlns:muws2="http://docs.oasis-open.org/wsdm/muws2-2.xsd" > xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" > xmlns:muse-op="http://docs.oasis-open.org/wsn/b-2" > xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> > <wsnt:SubscriptionReference> > > <wsa:Address>http://127.0.0.1: > 8081/TransFSService/services/SubscriptionManager</wsa:Address> > <wsa:ReferenceParameters> > > <muse-wsa:ResourceId>MuseResource-1</muse-wsa:ResourceId> > </wsa:ReferenceParameters> > </wsnt:SubscriptionReference> > <wsnt:Topic > Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete">muws2: > OperationalStatus</wsnt:Topic> > <wsnt:ProducerReference> > <wsa:ReferenceParameters /> > > <wsa:Address>http://127.0.0.1:8081/TransFSService/services/TransFS</wsa:Address> > </wsnt:ProducerReference> > <wsnt:Message> > <wsrf-rp:ResourcePropertyValueChangeNotification> > <wsrf-rp:OldValues> > > <muws2:OperationalStatus>Available</muws2:OperationalStatus> > </wsrf-rp:OldValues> > <wsrf-rp:NewValues> > > <muws2:OperationalStatus>Unavailable</muws2:OperationalStatus> > </wsrf-rp:NewValues> > </wsrf-rp:ResourcePropertyValueChangeNotification> > </wsnt:Message> > </muse-op:GetCurrentMessageResponse> > </soapenv:Body> > </soapenv:Envelope> > > But then I get this fault: > > org.apache.muse.ws.addressing.soap.SoapFault: [ID = > 'NoMessageContent'] The NotificationMessage XML does not have a > Message element. All messages must have a message payload associated > with them. > at org.apache.muse.ws.notification.impl.SimpleNotificationMessage. > <init>(SimpleNotificationMessage.java:114) > at org.apache.muse.ws.notification.remote.NotificationProducerClient. > getCurrentMessage(NotificationProducerClient.java:86) > at org.lsd.wsdm.TransFS.TransFSTest.main(TransFSTest.java:26) > > I don't know why because the received message has a Message element > but it fails because it cannot find it and so, it cannot generate a > NotificationMessage element. > > Using Muse 2.1 RC (the build that was posted in the message asking for vote). > -- > Saludos. > José Antonio Sánchez > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Saludos. José Antonio Sánchez --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
