03-19-2014 11:40 AM
Hello,
I'm developing a web application that wants to be a copy of the "Home/CampaignResults gadget".
I want to add real-time capabilities to this application.
I'm using SocialMiner version 9.
I'm using cisco jabberwerx library to build my xmpp client.
I'm able to connect to the XMPP server at http://<socialminer_server_ip>:7071/http-bind/
But when i send an iq message in order to subscribe to real-time updates for a single campaign, I receive an error.
This is my request message:
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<subscribe node='ccp.campaign.updates.test_facebook' jid='5002@ipcc.lab.local'/>
</pubsub>
This is the server's response:
<iq xmlns="jabber:client" type="error" id="iq13952526501242" to="5002@127.0.0.1/socialminer" from="10.0.1.154">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<subscribe node="ccp.campaign.updates.test_facebook" jid="5002@ipcc.lab.local"/></pubsub>
<error code="404" type="cancel">
<remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error>
</iq>
The SocialMiner server is not in the ipcc domain.
His hostname is sminer
Maybe there's an issue on the server configuration. It's just a lab deployment.
But I suspect that the problem is in the client request.
I need to know what are the correct values for the following attributes:
- the 'jid' attribute in the xml request to the server
- the 'to' attribute in the jabberwerx api call (xmppclient.sendIq(type, to, content, callback, timeout)).
Bye,
Andrea Ogliari
Solved! Go to Solution.
03-24-2014 07:57 AM
Here is a sample subscription sent from SocialMiner’s Home gadget.
The jid is typically something like <socialMinerUserName>@127.0.0.1/<uniquedId>. You should replace
ipcc.lab.local with 127.0.0.1. The to attribute should be set to
pubsub.127.0.0.1. Here is a sample request from one of SocialMiner’s gadgets:
<body xmlns="http://jabber.org/protocol/httpbind" sid="bf75bac1" rid="760657976">
<iq id="iq13953502014548" xmlns="jabber:client" type="set" to="pubsub.127.0.0.1">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<subscribe node="ccp.campaign.updates.campaign1" jid="admin@127.0.0.1/bf75bac1"></subscribe>
</pubsub>
</iq>
</body>
We have not had a customer using BOSH to build an application on top of SocialMiner. Do you have any further details on your deployment? If your webapp has a Java component, it’s simplest to use the smack java libraries to establish the subscription. If not, you're’ on the right track with Jabberwerx.
One other note; SocialMiner supports 60 simultaneous agents. Each BOSH subscription, would count as one of those agents. We probably need to get more constraints around this into our doc.
03-24-2014 04:20 AM
Hi Andrea,
SocialMiner sends asynchronous state change and tag update events to an XMPP client using the XMPP
Publish-Subscribe protocol (XEP-0060).SocialMiner's event mechanism uses XMPP extensions for event subscription and publication. Details can be found here: http://xmpp.org/extensions/xep-0060.html.
Thanks and Regards,
Geevarghese
03-24-2014 07:57 AM
Here is a sample subscription sent from SocialMiner’s Home gadget.
The jid is typically something like <socialMinerUserName>@127.0.0.1/<uniquedId>. You should replace
ipcc.lab.local with 127.0.0.1. The to attribute should be set to
pubsub.127.0.0.1. Here is a sample request from one of SocialMiner’s gadgets:
<body xmlns="http://jabber.org/protocol/httpbind" sid="bf75bac1" rid="760657976">
<iq id="iq13953502014548" xmlns="jabber:client" type="set" to="pubsub.127.0.0.1">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<subscribe node="ccp.campaign.updates.campaign1" jid="admin@127.0.0.1/bf75bac1"></subscribe>
</pubsub>
</iq>
</body>
We have not had a customer using BOSH to build an application on top of SocialMiner. Do you have any further details on your deployment? If your webapp has a Java component, it’s simplest to use the smack java libraries to establish the subscription. If not, you're’ on the right track with Jabberwerx.
One other note; SocialMiner supports 60 simultaneous agents. Each BOSH subscription, would count as one of those agents. We probably need to get more constraints around this into our doc.
03-25-2014 11:24 AM
Thank you very much for your help.
Now it works just fine.
The application is written for the greater part in object oriented javascript. I used java servlets in the server side.
In this case I think that Jabberwerx is the right choice.
As I said previously, I'm using SocialMiner version 9.
This limitation to 60 concurrent users, is confined to this version? Or this is true also for version 10?
In any case I have to be careful not to leave open subscriptions, I think.
Bye,
Andrea
04-10-2018 04:00 AM
I'm trying to connect and XMPP client to SocialMiner and just have no luck. Any idea what the parameters need to be in order to make the connection?
david
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide