Closed P-Product closed 11 years ago
Unless OpenFire or Spark is explicitly sending xmlns="", then it should already be inheriting the stream's jabber:client
default namespace.
If you use Python 2.x, you can add a print or log call in sleekxmpp/xmlstream/filesocket.py
in FileSocket.read
to print the raw incoming data before it goes through the XML parser to see if 'xmlns=""` is being sent.
no, it doesnt have this attribute
I am using Python3.3
I have also used pigin's XMPP console to see the raw stanzas. The one I pasted above is copied from there.
How come it will be using the default namespace? the xml.etree.ET.iterparse will just take whatever is in the xml, and all access methods in ElementBase are using the '{ns}tag' notation. Even when used with the '|*' for all languages it tries to get values with the XML_NS = 'http://www.w3.org/XML/1998/namespace' ;(
OK, I think we can close this issue My bad, Openfire was sending the correct namespace. I was using one of it's ad-hoc commands to get ActiveUserPresence and then it returned an xml where the presences were actually values of jabber:x:data form and did not have the jabber:client xmlns set. So when I was creating Presence from the xml it wouldn't work. But I have also missed the expected fields in the standard client_roster. And I thought that these two had the same source but it turned out that the client_roster was not properly updated because i didn't do 'send_presence' at the very start.
Hi guys!
I am writing an internal xmpp openfire bot with a great errbot library.
However I needed some additional xmpp features specifically I had to work directly with a roster
My version of sleekxmpp is (1.1.11)
Today I have killed 4 hour on trying to understand why the built in roster did not update it's RosterItem resources although the info was in the stanzas
and i found out why: Openfire does not set the namespace of presence stanzas to 'jabber:client'. And ElementBase just doesn't see those subelements!
I would love to see an option for sleekxmpp that would set the
jabber:client
as the default namespacewhat would you suggest?