I configured spring integration with xmpp and I can send message to other jid. To build the message I use the following method:
Message<?> message = MessageBuilder.withPayload("Test Message").
setHeader(XmppHeaders.TO, "pino@chiarottos-macbook-pro.local").
build();
messageChannel.send(message);
Now I would like to create a chat room, I tried to figured how to build a message containing a multi user chat request without success.
Any help?
using: XmppHeaders.TYPE
set to "groupchat"
and XmppHeaders.TO
to "myroommmm" does not work.. The xmpp server log:
[info] <0.609.0>@ejabberd_c2s:open_session:1105 ({socket_state,gen_tcp,#Port<0.16208>,<0.608.0>}) Opened session for chiarotto@chiarottos-macbook-pro.local/resource 2016-04-12 15:55:40.987 [info] <0.609.0>@ejabberd_s2s:new_connection:406 New s2s connection started <0.611.0>
[info] <0.611.0>@ejabberd_s2s_out:log_s2s_out:1253 Trying to open s2s connection: chiarottos-macbook-pro.local -> myroommmmme with TLS=false 2016-04-12 15:55:40.999 [info] <0.611.0>@ejabberd_s2s_out:open_socket:246 s2s connection: chiarottos-macbook-pro.local -> myroommmmme (remote server not found)
I'm running an integration test
Upadate 2: Using:
MultiUserChat multiUserChat = new MultiUserChat(xmppConnection,"prova");
try {
multiUserChat.join("soisdjdsoijds");
} catch (XMPPException.XMPPErrorException e) {
e.printStackTrace();
} catch (SmackException e) {
e.printStackTrace();
}
I get the folling error:
remote-server-not-found
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:196)
at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:352)
at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:516)
at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:451)
at radiosa.service.muc.MUCService.testRoom(MUCService.java:83)
(The server is correctly configured and It is working)