You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Damien Ligot <li...@enseirb.fr> on 2007/12/16 22:16:54 UTC
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/prese
nce-server/services/SubscriptionManager
<http://localhost:8080/presence-server/services/SubscriptionManager%3c/wsa: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</muse-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:julien@enseirb.fr</wsnt:
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/prese
nce-server/services/WsResource
<http://localhost:8080/presence-server/services/WsResource%3c/wsa:Address>
</wsa:Address>
</wsnt:ProducerReference>
<wsnt:Message>
<tns:StatusChange xmlns:tns="http://ws.apache.org/muse/test/wsrf">
<tns:Name>julien@enseirb.fr
<mailto:julien@enseirb.fr%3c/tns:Name> </tns:Name>
<tns:Status><?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="pres:julien@enseirb.fr">
<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
RE: An attribute appears twice in a NotificationMessage
Posted by le...@bt.com.
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:ligot@enseirb.fr]
Sent: Tue 18-Dec-07 9:52 PM
To: muse-user@ws.apache.org
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 : lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
Envoyé : lundi 17 décembre 2007 12:03
À : muse-user@ws.apache.org
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:ligot@enseirb.fr]
Sent: 16 December 2007 21:17
To: muse-user@ws.apache.org
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:julien@enseirb.fr</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>julien@enseirb.fr
<mailto:julien@enseirb.fr%3c/tns:Name> </tns:Name>
<tns:Status><?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="pres:julien@enseirb.fr">
<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: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
RE: An attribute appears twice in a NotificationMessage
Posted by Damien Ligot <li...@enseirb.fr>.
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 : lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
Envoyé : lundi 17 décembre 2007 12:03
À : muse-user@ws.apache.org
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:ligot@enseirb.fr]
Sent: 16 December 2007 21:17
To: muse-user@ws.apache.org
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:julien@enseirb.fr</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>julien@enseirb.fr
<mailto:julien@enseirb.fr%3c/tns:Name> </tns:Name>
<tns:Status><?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="pres:julien@enseirb.fr">
<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: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org
RE: An attribute appears twice in a NotificationMessage
Posted by le...@bt.com.
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:ligot@enseirb.fr]
Sent: 16 December 2007 21:17
To: muse-user@ws.apache.org
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:julien@enseirb.fr</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>julien@enseirb.fr
<mailto:julien@enseirb.fr%3c/tns:Name> </tns:Name>
<tns:Status><?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="pres:julien@enseirb.fr">
<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: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org