there seems to be a patch to fix this issue coming out or is out follow the link on this JIRA item https://issues.apache.org/jira/browse/MUSE-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
/Lenni -----Original Message----- From: Damien Ligot [mailto:[EMAIL PROTECTED] Sent: Tue 18-Dec-07 9:52 PM To: [email protected] Subject: RE: An attribute appears twice in a NotificationMessage Hi Thanks for your answer. Actually, I applied the second solution to avoid the problem before asking for your help. Yet I don't find it very "smart". Is there any way to correct the problem on the server side ? Has the problem been located in the source code ? Damien -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Envoyé : lundi 17 décembre 2007 12:03 À : [email protected] Objet : RE: An attribute appears twice in a NotificationMessage Hi Damien It's a known issue for Muse 2.2, it has to do with the way it assembles the notification message and Xerces. If you're only interested in the actual payload of the notification message, then you can use: Element managementEvent = message.getMessageContent(new QName("http://docs.oasis-open.org/wsdm/muws1-2.xsd","ManagementEvent")); And then utilize XPath to extract the needed payload elements. This will get you around the issue for Muse 2.3 (what I use), but should work for Muse 2.2 as well. Another solution is to use XmlUtils.toString on the notification message and then remove the extra headerfield with String pattern search. /Lenni -----Original Message----- From: Damien Ligot [mailto:[EMAIL PROTECTED] Sent: 16 December 2007 21:17 To: [email protected] Subject: An attribute appears twice in a NotificationMessage Hi I encounter a problem with the reception of a NotificationMessage. Indeed, I need to parse the message in order to extract a Element (tns:Status) but the following error appears : [Fatal Error] :5:65: Attribute "xmlns:wsnt" was already specified for element "wsnt:NotificationMessage". Which is true since xmlns:wsnt appears twice in the NotificationMessage I receive: <wsnt:NotificationMessage xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:muse-wsa="http://ws.apache.org/muse/addressing" xmlns:tns="http://ws.apache.org/muse/test/wsrf" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"> <wsnt:SubscriptionReference> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/p rese nce-server/services/SubscriptionManager <http://localhost:8080/presence-server/services/SubscriptionManager%3c/w sa:A ddress> </wsa:Address> <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"> <muse-wsa:ResourceId xmlns:muse-wsa="http://ws.apache.org/muse/addressing">MuseResource-1</mu se-w sa:ResourceId> </wsa:ReferenceParameters> </wsnt:SubscriptionReference> <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete" xmlns:tns="http://ws.apache.org/muse/test/wsrf">tns:[EMAIL PROTECTED]</w snt: Topic> <wsnt:ProducerReference> <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing"/> <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:8080/p rese nce-server/services/WsResource <http://localhost:8080/presence-server/services/WsResource%3c/wsa:Addres s> </wsa:Address> </wsnt:ProducerReference> <wsnt:Message> <tns:StatusChange xmlns:tns="http://ws.apache.org/muse/test/wsrf"> <tns:Name>[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]/tns:Name> </tns:Name> <tns:Status><?xml version="1.0" encoding="UTF-8"?> <presence xmlns="urn:ietf:params:xml:ns:pidf" entity="pres:[EMAIL PROTECTED]"> <tuple id="u3dqoo"> <status> <basic>closed</basic> </status> </tuple> </presence></tns:Status> </tns:StatusChange> </wsnt:Message> </wsnt:NotificationMessage> I use Tomcat 6 and Muse 2.2. Has anyone encounter the same error ? Any idea ? D. Ligot --------------------------------------------------------------------- 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
