I am using Smack 4.2 to implement a fairly basic XMPP chat client. I am using Prosody XMPP server. Prosody is fairly strict about requiring "xmlns=jabber:client" in all incoming stanzas. Smack 4.2 does not include this attribute in its outgoing stanzas. I have tried extending Bind and Session stanzas, and I can make the connection work that way. But, now I am getting into joining rooms, and I really dont want to modify Smack's MUC code so that it can accept a modified Presence message.
Please help!!
I do not know why Prosody server requires it, there is nothing about it in official XEP-0045 standard https://xmpp.org/extensions/xep-0045.html#enter
Maybe there is a way to disable it at Prosody side somehow
Smack 4.3 does add xmlns to every outgoing IQ: https://github.com/igniterealtime/Smack/blob/master/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java#L518
So that at least solves the xmlns problem.
Related
I am making a chat app with Operfire server using Smack API. I want to implement the XEP-0235: OAuth Over XMPP or token based reconnection in my app. The doc is not giving much information, searched a lot but I did not get any answer.
How can I implement the extension?
I read XEP-xxxx: Token-based reconnection doc, U send the following iq packet as mention in extension.
<iq to='domain#example.com' id='60fG0-45' type='get'><query xmlns='erlang-solutions.com:xmpp:token-auth:0'</query></iq>
but not receiving any response from server.
I found a plugin on https://github.com/rxwen/openfire-oauth-auth-provider
but I don't know how to use it or is it what am I searching for.
Regarding XEP-0235: OAuth Over XMPP
The document contains WARNING in start as:
WARNING: This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process.
The document of XEP-xxxx: Token-based reconnection contains WARNING as:
WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document is not yet an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at http://xmpp.org/extensions/ and announced on the mailing list.
So it's clear that you will not find any such functionality in Openfire Server and also there are very rare chances to find some plugin implementing any of these XEP's.
Also for such requirements, it requires changes on both Server and Client ends which means Openfire Server and Smack library for Android both will have to implement it.
I need to transfer files to a user connected to a XMPP Server.
The file transfer is supported by Spring Integration XMPP? (The current release version is 4.1.6-RELEASE, the snapshot is 4.2.0-SNAPSHOT).
I succesfully send text messages using the XMPP Message Outbound Gateway using a configuration like this:
<int-xmpp:outbound-channel-adapter id="outboundEventAdapter"
channel="outboundEventChannel"
xmpp-connection="testConnection"/>
Using this Outbound Gateway I'm not able to send files (only String and org.jivesoftware.smack.packet.Message payloads are supported)
Thanks in advance.
Massimo
The Spring Integration XMPP module is fully based on the Smack library, so I'd be glad to hear from you or from anybody else who confirm and show us how to do that with Smack first of all.
And only after that we will be able to come with some adaptation from our perspective.
Please, refer to Smack XMPP File Transfer for more information.
From other side if you are able to come up with some solution on the matter you always can wrap it to the standard <int:service-activator> to make your application working.
I'm trying to implement file transfer via xmpp, my server is openfire 3.9.3.
I have tried to imitate Sparks' stanzas and I got to a dead end.
please help!
file transfer is already implemented in xmpp servers like openfire.
You need to implement it in client side.
Check strophe js or candy js, there is an API to do this.
I searched source code of openfire , but did not find any file working for XEP-0234. Can anyone else give me an answer, as I am new to openfire and not sure about it.
There is no special server code required for XEP-0234. The server must route only iq stanzas for it from client to client. This is defined in the XMPP core protocols and supported by every XMPP compliant server.
I've been searching high and low for a plugin that handles MUC administration through HTTP requests for Openfire. I've looked in the plugins and even in the community pages but I've had no luck so far.
Is there a plugin for this? Where can I find it?
If there are none, what are my alternatives aside from creating my own? Kinda like how ejabberd has mod_rest or even ejabberdctl.
If anyone can point me to the right direction, that would be really great!
I ended up creating a service for http requests and linking it to Openfire's MySQL back end. Easier and gives me more control.
Openfire have cache mechanism, Directly operate Mysql table have some issue, User information will delay before openfire cash flush.
I do it by xmpphp, and a new method to add muc room and room member by xmpp protocol, but i need user's password every operation.
If you check again the Plugin site from Openfire you will find out that there is a Plugin for that named "MUC Service". That do exactly what you need.
Here is the documentation: http://www.igniterealtime.org/projects/openfire/plugins/mucservice/readme.html