I'm following the documentation and trying to create a room:
//Create a MultiUserChat using a Connection for a room
MultiUserChat muc = new MultiUserChat(conn1, "myroom#mycompany.com");
// Create the room
muc.create("testroom");
// Send an empty room configuration form which indicates that we want
// an instant room
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
When I go into PSI, click service discovery, click multiuserchat, right click browse, click myroom. It pops an error message, that says "There was an error getting agents for myroom#mycompany.com, Reason: Feature not implemented. The feature requested is not implemented by the recipient server and cannot be processed".
Any suggestions, anyone?
Now I can create a new room using PSI. I also tried muc.join instead of muc.create. Same error message.
Without knowing your exact setup, I would guess that your room name (myroom#mycompany.com) is incorrect. You get a Feature not implemented because the XMPP entity mycompany.com does likely not act as MUC service. Those are implemented as separate XMPP component, usually named conference or muc, e.g. conference.mycompany.com.
Related
I am using vuejs and socket.io in my application. The task is this: if I type a message in a dialogue with the user, display a message to both the interlocutor and myself, that I am typing a message.
How can I implement this?
Socket.io gives you lots of options to send messages across the board. What I always found very helpful is the Emit cheatsheet from the official docs (https://socket.io/docs/emit-cheatsheet/).
Here are some of the methods on how to broadcast messages to all clients including sender.
io.on('connect', onConnect);
function onConnect(socket) {
// sending to all clients in 'chat' room, including sender
io.in('chat').emit('typing', 'User xy is typing');
// sending to all clients in namespace 'chatNamespace', including sender
io.of('chatNamespace').emit('typing', 'User xy is typing');
// sending to a specific room in a specific namespace, including sender
io.of('chatNamespace').to('chat').emit('typing', 'User xy is typing');
}
Now this of course are just example methods. You would need to wrap this into your own business logic and probably register some socket event listeners to get this going.
I have gone through the below link to know about Table REST API of ServiceNow:
https://express.servicenow.com/support/documentation/r_TableAPIGETRecordMethod/
My requirement is to obtain all the record from Alert table
using Table REST API i.e. 'GET /api/nowv1/table/(tableName)'.
Now my question is , what will be the name of the (tablename) for Alert in the API itself to get the alerts which are already created in the table and can be seen using via "manage the alert life cycle feature" by navigating "Event Management > Active Alerts" (See : http://wiki.servicenow.com/index.php?title=Managing_Alerts#Managing_the_Alert_Life_Cycle) ?
If you're an administrator, you can get the table name from the table label (e.g. "Alert") by going to the sys_db_object table (via "Tables" entry in the left nav).
Just search for the row with the label you want, and the table name will be the name of that row.
As any other user, you can just open any record in the table in a new tab/window (i.e. outside of the usual frameset) and look at the URL.
For your case, I opened "All Alerts", then opened an arbitrary record, which took me to this url suffix:
/em_alert.do?sys_id=df7a6f00d72321008de76ccf6e610322
This tells us that the table name for "All Alerts" is em_alert
I got the answer.
In order to work with servicenow event/alert, you need to plugin the Event Management module in your PaaS developer instance, if you are new in ServiceNow.
This link (https://developer.servicenow.com/app.do#!/home ) is for applying for new developer instance. First you need to register and then you will be getting the instance. Once you have the instance allocated, you are provissioned to add "Event Management" plugin and then your developer instance (so far free) is a place for you to learn about ServiceNow Event Management system for doing research & development on event/alert table API etc. Note : The developer instance may not support real monitoring features e.g. : (1) detect an event; (2) send an alert of an event;
The API for getting alert info will be :
GET https://.service-now.com/api/now/v1/table/em_alert with basicauth credential
regards
SK
I am using Smack 4.1.1 as Gradle dependency in mine Android project.
I have successfully established connection with mine local OpenFire server.
But I have an issue while creating temporary room from Android client.
final MultiUserChat multiUserChat = userChatManager.getMultiUserChat(roomId);
try {
multiUserChat.create(connection.getUser());
LOG.debug("room created");
} catch (XMPPException.XMPPErrorException | SmackException e) {
LOG.error("create room error:{}", e);
}
try{
multiUserChat.sendConfigurationForm(new Form(DataForm.Type.submit));
} catch (SmackException.NoResponseException | XMPPException.XMPPErrorException | SmackException.NotConnectedException e) {
LOG.error("sending room configurations error:{}", e);
}
The most great thing is that I can see that room was created in OpenFire admin panel and get room information from another client.
try {
MultiUserChatManager userChatManager = MultiUserChatManager.getInstanceFor(connection);
RoomInfo info = userChatManager.getRoomInfo(roomId);
LOG.debug("room has {} occupants", info.getOccupantsCount());
joinToExistingRoom(roomId);
} catch (XMPPException.XMPPErrorException e) {
LOG.error("join room error:{}", e);
final XMPPError.Condition condition = e.getXMPPError().getCondition();
if (condition == XMPPError.Condition.item_not_found) {
LOG.error("room does not exist error:{}", e);
createRoom(roomId);
}
}
But while trying to join room from second client I receive XMPPError: recipient-unavailable - wait.
Snippet of mine joinRoom method:
final MultiUserChat multiUserChat = userChatManager.getMultiUserChat(roomId);
try {
multiUserChat.join(connection.getUser());
LOG.debug("joined to room:{}", roomId);
} catch (SmackException.NoResponseException
| XMPPException.XMPPErrorException
| SmackException.NotConnectedException e) {
LOG.error("error joining room {}", e);
}
So I am catching error joining room org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError:recipient-unavailable - wait
So the question is what can be wrong?
I also tried creating submitForm from createAnswerForm() method. But the result is the same.
One solution I have found to make it work is to send persistantroom as true in Answer of configuration form. But this method creates persistent room, though I need this room to be destroyed after all attendees leave room.
Maybe it is a simple problem, but now I do not know how to solve this issue.
Help will be appreciated a lot.
Thanks in advance.
The create() method documentation states that:
Creates the room according to some default configuration, assign the requesting user as the room owner, and add the owner to the room but not allow anyone else to enter the room (effectively "locking" the room). The requesting user will join the room under the specified nickname as soon as the room has been created.
To create an "Instant Room", that means a room with some default configuration that is available for immediate access, the room's owner should send an empty form after creating the room.
Try to send configuration form this way:
multiUserChat.create(connection.getUser())
Form form = new Form(DataForm.Type.submit);
multiUserChat.sendConfigurationForm(form);
See also muc extension documentation
In IBM Connections 4.0 is there any way to get another users activity stream. I can get my steam with #me but if I try my connections id or another users id I get the following error:
This works:
/opensocial/basic/rest/activitystreams/#me/#following/#all?rollup=true
This returns an error - my id:
/opensocial/basic/rest/activitystreams/7AF0B251-9F97-CA6D-8525-61370072A674/#following/#all?rollup=true
Error 400: The user ID(s) [7AF0B251-9F97-CA6D-8525-61370072A674] is/are not recognized by the system.
And I know this is my ID....
<userid>7AF0B251-9F97-CA6D-8525-61370072A674</userid>
Any suggestions...the manual says the following which doesn't sound good but doesn't totally close the door either:
As per the OpenSocial standard, a given users Activity Stream is retrievable by:
1. Specifying that user (#me in the URLs below, IBM Connections does not generally allow retrieval of other users streams).
Any help would be appreciated....
This should do it: https://connections.ibm.com/common/opensocial/basic/rest/activitystreams/urn:lsid:lconn.ibm.com:profiles.person:91ae7240-8f0a-1028-8400-db07163b51b2/#involved/#all?rollup=true&shortStrings=true&format=atom (plug in the right user id)
Few questions around getting Chat working with Smack (3.2.1)/Openfire(3.7.1Alpha).
I am currently testing it using a unit test. My unit test creates a connection, creates account, logs in, adds a new user to its roster, attempts to send a chat message to the new user and eventually deletes the users. Apart from my confusions around getting chat to work, others seem to work (verified using openfire admin dashboard).
A. When I do the following
public void sendChatMessage(String sender, String receiver, String message) {
Chat chat = chatManager.createChat(receiver, messageListener);
chat.sendMessage(message);
}
Current connection is of the 'sender' (i.e. sender is logged in) and my attempt is to send a message to 'receiver'. When I get callback in my listener, message.getFrom() returns the 'receiver' and message.getBody() returns null. I am obviously trying to send a message on behalf of 'sender' to 'receiver'. What am I missing?
B. My 'sender' and 'receiver' are simply unique 'usernames' (without
any #domain) and my server is simply 'localhost'.
connection = new XMPPConnection("localhost");
Do I need to modify the 'receiver' to be of different value to make it a valid JID (there are no errors at the moment)? What if I change my server (& the openfire server configurations)?
C. I am assuming there will always be one XMPPConnection per user? Is this correct?
D.
XMPPConnection.DEBUG_ENABLED = true;
When I have XMPPConnection in debug mode, a new window opens up, however, it is tied with my IDE. How can I have it not tied to the ide so I can look into the logs while trying to debug the code?