RE: Component: XPathMonitor
Mannering, J (Joe <Joe.Mannering <at> rabobank.com>
2005-09-08 12:16:02 GMT
I found the problem: the XPathListener makes sure the expression always
starts with a ./ (and appends where necessary) but the sendAndWatch does
not, so the following now works:
Xpath xpath = sdf.createXPath(".//app:presence[ <at> id='blah']", ns)
Cheers
Joe.
-----Original Message-----
From: Mannering, J (Joe)
Sent: 07 September 2005 11:04
To: 'jso-devel <at> jabberstudio.org'
Subject: Component: XPathMonitor
Hi
I am using JSO to build a component connector
The component needs to be able to create and configure a room, and I am
using XPathMonior.sendAndWatch to send presence and request the
configuration form for rooms
The xmpp server is wrapping all packets with a <route/> element
(including replies to messages sent) which means
PacketMonitor.sendAndWatch does not work as the packets do not match
(??)
Roughly, I do this:
( ns has app set to default namespace. Xpath would be changed to
[id='...'])
Xpath xpath = sdf.createXPath("//app:presence", ns)
XPathMonitor.sendAndWatch(stream, presence packet, xpath, 10000)
The packet is returned (within 10 seconds), and can be trapped by
XPathListener - but not here?
Any ideas?
Or is there a way to unwrap packets and re-dispatch the event?
Many thanks
Joe.
_____________________________________________________________
This email (including any attachments to it) is confidential, legally privileged, subject to copyright
and is sent for the personal attention of the intended recipient only. If you have received this email in
error, please advise us immediately and delete it. You are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this information is strictly
prohibited. Although we have taken reasonable precautions to ensure no viruses are present in this
email, we cannot accept responsibility for any loss or damage arising from the viruses in this email or
attachments. We exclude any liability for the content of this email, or for the consequences of any
actions taken on the basis of the information provided in this email or its attachments, unless that
information is subsequently confirmed in writing. If this email contains an offer, that should be
considered as an invitation to treat.
_____________________________________________________________