[xgws-user] Problem with WS-Messenger

Yi Huang yihuan_at_cs.indiana.edu
Fri, 16 Mar 2007 11:57:00 -0400


Hi,

You WsmgUtil.getTopicLocalString is for getting topic string from a topic
element, not the whole soap envelop. You need to fist get the topic element.
In WS-Eventing, this is in the SOAP header. I modified your code to add
this. Please try if it works. 

Thanks,

Yi

public void handleNotification(String message) {

    ...
      
    XmlElement messageAsXml = 
WsmgUtil.convertStringMessageToXmlElement(message);
XmlElement topicEl= messageAsXml.element(null,
"Header").element(WsmgConstants.WSNT_NS, "TopicExpression");
          if(topicEl!=null){
topicLocalString=WsmgUtil.getTopicLocalString(topicEl);
                    }
    String topic = WsmgUtil.getTopicLocalString(messageAsXml);

    System.out.println("TOPIC: "+topic);
       
}


-----Original Message-----
From: xgws-user-admin_at_cs.indiana.edu [mailto:xgws-user-admin_at_cs.indiana.edu]
On Behalf Of Alex Piqueras
Sent: Wednesday, March 14, 2007 5:45 AM
To: xgws-user_at_cs.indiana.edu
Subject: [xgws-user] Problem with WS-Messenger

Hi,

I'm sorry but I have another problem. I'm not able to obtain the "topic" 
name in "handleNotification" method.

For example, I tried:

public void handleNotification(String message) {

    ...
      
    XmlElement messageAsXml = 
WsmgUtil.convertStringMessageToXmlElement(message);
    String topic = WsmgUtil.getTopicLocalString(messageAsXml);

    System.out.println("TOPIC: "+topic);
       
}

What's the problem? I think "getTopicLocalString" is not working in this 
case.
Is there another way to get the topic name?

Thanks and Excuse me for disturbing you again.

-- 
-------------------------------------------------------
Alejandro Piqueras Meseguer (apiqueras_at_dif.um.es)
Dept. Ingeniería de la Información y las Comunicaciones
Facultad de Informática
Universidad de Murcia

_______________________________________________
xgws-user mailing list
xgws-user_at_cs.indiana.edu
http://mailman.cs.indiana.edu/mailman/listinfo/xgws-user