We create an app that uses XMPP protocol. Initially we started development and used some XMPP server for debug. That was Ok, and we managed to prevent redundant avatar loading by storing graphic files locally and checking the file hash while receiving user Presence update.
But now we switched to new Openfilre server and it keeps sending us all available user avatars not only when we request VCard but also using some message immediately after our user logs in:
<message id="ca82demo01#fffchat__jason#fffchat__jBUhd" to="jason#fffhat/FFFChat" from="ca82demo01#fffchat">
<event xmlns="http://jabber.org/protocol/pubsub#event">
<items node="urn:xmpp:avatar:data">
<item id="66d0dee0216e5466fe17403f1da16aa39d4e1698">
<data xmlns="urn:xmpp:avatar:data">... SOME BIG CHUNK OF DATA ...</data>
</item>
</items>
</event>
<delay xmlns="urn:xmpp:delay" stamp="2012-03-16T00:00:32.298Z"/>
<addresses xmlns="http://jabber.org/protocol/address">
<address jid="ca82demo01#fffchat/53bf00a8" type="replyto"/>
</addresses>
</message>
It keeps me wonder what exact outgoing message requests it from Openfire? Or is it just Openfire server configured to always send us all the avatar graphics for entire roster?
How can this be resolved so we won't have this redundant traffic?
Just in case, these are outgoing messages:
<stream:stream to="fffchat.openfire.local" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<?xml version="1.0"?>
<stream:stream to="fffchat.openfire.local" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9Imphc29uIixyZWFsbT0icHBpY2hhdCIsbm9uY2U9ImVhcGVpTlNFZ3NOZzRXRFlsVC9zd1cyLzVWbzMzQWlsYzRvZWFRRFIiLGNub25jZT0iMDBERUFEQkVF
<auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">AGphc29uAGFiYzEyMw==</auth>
<?xml version="1.0"?>
<stream:stream to="fffchat.openfire.local" xml:lang="en" version="1.0" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams">
<iq id="_xmpp_bind1" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>PPIChat</resource></bind></iq>
<iq id="_xmpp_session1" type="set"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>
<iq id="roster1" type="get"><query xmlns="jabber:iq:roster"/></iq>
<presence><show>chat</show><status>online</status><x xmlns="vcard-temp:x:update"><photo>16286eb46a54fb48d70dc4fbd548bcd16f78cd34</photo></x></presence>
<iq type="get"><query xmlns="jabber:iq:private"><ppidata xmlns="ppi:userdata:favorites"/></query></iq>
It looks like you were trying to use XEP-0084, messed it up, then switched to XEP-0153. You likely explicitly subscribed to changes to one or more peoples' avatars on your test account, rather than implementing XEP-0163 correctly, which can be quite confusing at first. Easiest fix is to just use a different account. If you want to clean it up, send XEP-0060 unsubscribe protocol in response to each publish that you get:
<iq type='set'
from='jason#fffhat/FFFChat'
to='ca82demo01#fffchat'
id='unsub1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<unsubscribe
node='urn:xmpp:avatar:data'
jid='jason#fffhat'/>
</pubsub>
</iq>
Related
I have created an application developped by Embarcadero XE5 C++. I use THTTPRio to consume a web service.
I have a problem with the request message generated by our application. It seems that namespaces are missing in the soap message for NS1, NS2 and NS3.
I think there's a bug in the Embarcadero.
Here the SOAP request message generated by Embarcadero:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<G110Request xmlns="urn:wsdltypes.nmvs.eu:v1.0">
<Header xmlns="urn:types.nmvs.eu:v1.0">
<Auth>
<ClientLoginId>xxx</ClientLoginId>
<UserId>xxx</UserId>
<Password>xxx</Password>
</Auth>
<UserSoftware NS1:name="xxxxx" NS2:supplier="xxxx"/>
</Header>
<Body xmlns="urn:types.nmvs.eu:v1.0">
<Product>
<ProductCode NS3:scheme="GTIN">1234567891234</ProductCode>
</Product>
</Body>
</G110Request>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thanks for your help
I'm working on developing an XMPP Client communicating over an ejabberd community server (version 17.09) that we host ourselves.
I'm having trouble to implement the MucSub Feature (supported since version 16.08 as far as I know).
When I'm sending this XML command (described in the ejabberd documentation for subscribing to a chatroom):
<iq from='hag66#shakespeare.example'
to='coven#muc.shakespeare.example'
type='set'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<subscribe xmlns='urn:xmpp:mucsub:0'
nick='mynick'
password='roompassword'>
<event node='urn:xmpp:mucsub:nodes:messages' />
<event node='urn:xmpp:mucsub:nodes:affiliations' />
<event node='urn:xmpp:mucsub:nodes:subject' />
<event node='urn:xmpp:mucsub:nodes:config' />
</subscribe>
</iq>
(of course entering existing jid's for this server, allow_subscription set to true for this chatroom) I get the result:
<iq xml:lang='de'
to='hag66#shakespeare.example'
from='coven#muc.shakespeare.example'
type='error' id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<subscribe xmlns='urn:xmpp:mucsub:0' nick='mynick'>
<event node='urn:xmpp:mucsub:nodes:messages'/>
<event node='urn:xmpp:mucsub:nodes:affiliations'/>
<event node='urn:xmpp:mucsub:nodes:subject'/>
<event node='urn:xmpp:mucsub:nodes:config'/>
</subscribe>
<error code='503' type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xml:lang='de' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>No module is handling this query</text>
</error>
</iq>
When I alter the query to:
<iq from='hag66#shakespeare.example'
to='coven#muc.shakespeare.example'
type='set'
id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'>
<subscribe xmlns='urn:xmpp:mucsub:0'
nick='mynick'
password='roompassword'>
<event xmlns="http://jabber.org/protocol/pubsub#event" node="urn:xmpp:mucsub:nodes:messages" />
<event xmlns="http://jabber.org/protocol/pubsub#event" node="urn:xmpp:mucsub:nodes:affiliations' />
<event xmlns="http://jabber.org/protocol/pubsub#event" node="urn:xmpp:mucsub:nodes:subject' />
<event xmlns="http://jabber.org/protocol/pubsub#event" node="urn:xmpp:mucsub:nodes:config' />
</subscribe>
</iq>
I get the result:
<iq xmlns="jabber:client"
to="hag66#shakespeare.example"
xml:lang="en"
type="result"
from="coven#muc.shakespeare.example"
id="agsXMPP_8">
<subscribe xmlns="urn:xmpp:mucsub:0" nick="mynick" />
</iq>
which I interpret as the query being successfull. Also when I query the Chatrooms this user is subscribed to the chatroom is listed.
My Problem now is: no matter which of this methods I use, the user does not get notifications for messages in that chat if he is not present in exactly this chatroom.
Now the strangest thing is: if I get DiscoInfo from the server the MucSub Feature (urn:xmpp:mucsub:0) is not listed, which I don't understand as the Feature is supported by the server version I'm using and according to the documentation is enabled by default and can't even be disabled.
Has anyone experienced the same issue and/or knows how to resolve it?
Thanks in advance for your help
So finally we found the issue:
instead of sending the request to "coven#muc.shakespeare.example" we were sending it to "coven#shakespeare.example" which didn't work and was forgotten to change in the questions text
I was trying to create a MUC room from my XMPP client side communicating with Ejabberd.
Here's my Ejabberd muc config:
mod_muc:
## host: "conference.#HOST#"
access: muc
access_create: muc_create
access_persistent: mud_create
access_admin: muc_admin
db_type: odbc
max_user_conferences: 100
default_room_options:
mam: true
public: false
public_list: false
allow_change_subj: false
allow_user_invites: false
members_only: false
members_by_default: false
anonymous: false
allow_private_messages: true
persistent: true
Here's the features I got from the client side on muc:
<iq xmlns='jabber:client' from='conference.my.domain.com' to='my_id#my.domain.com/null' id='iqid1:sendIQ' type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<identity category='conference' type='text' name='Chatrooms'/>
<feature var='http://jabber.org/protocol/disco#info'/>
<feature var='http://jabber.org/protocol/disco#items'/>
<feature var='http://jabber.org/protocol/muc'/>
<feature var='http://jabber.org/protocol/muc#unique'/>
<feature var='jabber:iq:register'/>
<feature var='http://jabber.org/protocol/rsm'/>
<feature var='vcard-temp'/>
<feature var='urn:xmpp:mam:tmp'/>
<feature var='urn:xmpp:mam:0'/>
<feature var='urn:xmpp:mam:1'/>
<x xmlns='jabber:x:data' type='result'>
<field var='FORM_TYPE' type='hidden'>
<value>http://jabber.org/network/serverinfo</value>
</field>
</x>
</query>
</iq>
When I tried to create a MUC room from my client side with:
<presence from='my_id#my.domain.com/null' to='new_room_id#conference.my.domain.com/my_nickname' xmlns='jabber:client'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
I got a new room created response:
<presence xmlns='jabber:client' from='new_room_id#conference.my.domain.com/my_nickname' to='my_id#my.domain.com/null'>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item jid='my_id#my.domain.com/null' affiliation='owner' role='moderator'/>
<status code='110'/>
<status code='100'/>
<status code='201'/>
</x>
</presence>
When I tried to get the configuration form to set up room fields with:
<iq from='my_id#my.domain.com/null' to='new_room_id#conference.my.domain.com/my_nickname' type='get' xmlns='jabber:client' id='iqid2:sendIQ'>
<query xmlns='http://jabber.org/protocol/muc#owner'/>
</iq>
I got the answer from Ejabberd server:
<iq xmlns='jabber:client' from='new_room_id#conference.my.domain.com/my_nickname' to='my_id#my.domain.com/null' id='iqid2:sendIQ' type='get'>
<query xmlns='http://jabber.org/protocol/muc#owner'/>
</iq>
So here are my questions:
Why does Ejabberd server response to my queries with the same type, but not with something like type='result' or type='error'? I've tried other queries with type='set', the same thing happened.
Why aren't there something like : <feature var='http://jabber.org/protocol/muc#owner'/> or <feature var='http://jabber.org/protocol/muc#admin'/> in the features on muc service?
It seems possible to create v-card for rooms, how does it work? Does it require some additionnal configurations on the server side?
Actually, you are not sending the packet to the room but to user nickname: 'new_room_id#conference.my.domain.com/my_nickname'. Thus, the packet you send is routed back to you. Remove "/my_nickname" and you will be able to talk to the room itself and get your configuration form.
As Mickaƫl points out, you're just sending the <iq/> to your own occupant address, so ejabberd is passing it back to you.
For your other questions:
Interesting - I tried it out and read the Service Discovery XEP, and I think it's basically considered redundant. The #owner, #admin and #user namespaces are components of MUC, so you should assume their support just from http://jabber.org/protocol/muc. As you can see in XEP-0030, the reference example does not include them either: http://xmpp.org/extensions/xep-0030.html#example-2
I don't think vcard-temp means you can set anything - you can only request the MUC server's vCard, which returned
<vCard xmlns='vcard-temp'>
<FN>ejabberd/mod_muc</FN>
<URL>http://www.process-one.net/en/ejabberd/</URL>
<DESC>
ejabberd MUC module
Copyright (c) 2003-2011 ProcessOne
</DESC>
</vCard>
when I tried it.
I am trying to mimic the XMPP stream to connect to the google talk servers.
I am however facing a problem when sending the session IQ:
The problem: I don't receive a response from the server in any way after sending this:
<iq id="skcevhxmpp_ceschool#gmail.com_6" type="set" to="gmail.com"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
This is the complete flow:
<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>**
<stream:stream from="gmail.com" id="7FB5653900A7A245" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
<stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required/></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
<stream:stream from="gmail.com" id="508024A63664BA3D" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
<stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-OAUTH2</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism><mechanism>PLAIN</mechanism></mechanisms></stream:features>
<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">{Valid auth token}</auth>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
<stream:stream from="gmail.com" id="A407B98F76E98F73" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
<stream:features><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features>
<iq id="skcevhxmpp_ceschool#gmail.com_5" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>xmpp</resource></bind></iq>
<iq id="skcevhxmpp_ceschool#gmail.com_5" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>ceschool#gmail.com/xmppFC762B4C</jid></bind></iq>
<iq id="skcevhxmpp_ceschool#gmail.com_6" type="set" to="gmail.com"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
Extra information:
I use the PLAIN authentication (see:
https://developers.google.com/cloud-print/docs/rawxmpp)
I start using the SslStream after I receive the proceed ... xmpp tls
I use the google talk server to send the xmpp messages to (talk.google.com)
The expected response would be something like:
<iq xmlns="jabber:client" from="gmail.com" type="result" id="skcevhxmpp_ceschool#gmail.com_6" />
Thanks in advance!
try to send the session iq without the to attribute.
<iq id="abcd" type="set">
<session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
</iq>
I am using libstrophe C library to Create xmpp clint.I am successfully able to create node(open node) and send request for subscription from other users,which get added.
Now when i try to publish,using the following stanza,
<iq type='set'
from='hamlet#pratik.com/blogbot'
to='pubsub.pratik.com'
id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='pratik'>
<item id='123456'>
<entry xmlns='http://www.w3.org/2005/Atom'>
<title>Soliloquy</title>
<summary>
To be, or not to be
</summary>
</entry>
</item>
</publish>
</pubsub>
I get,
<error code="501" type="cancel"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error>
Any suggestions?
am using ejabberd as server