[rabbitmq-discuss] Beginners issue - How to run JSON RPC Chat Example
Simon MacMullen
simon at rabbitmq.com
Mon Aug 15 11:37:45 BST 2011
Hi Juliette.
On 05/08/11 11:48, Juliette wrote:
> I am trying to run JSON RPC chat example (from the source code) with my
> RabbitMQ server installed on the same machine.
> But the channel opening don't work (a JSONError is thrown by the
> receiveReply function (in jsonrpc.js)).
>
> I have set in rabbitmq.js :
> - factoryServiceUrl: "http://localhost:55670/rpc/rabbitmq"
> - rpcServiceUrlBase: "http://localhost:55670/rpc/"
>
> What must I do to get this working ?
> Have I set the right parameters ?
> Which port must you listen to normally ?
That looks reasonable. If you're seeing a JSONError in receiveReply then
the server is sending back some non-json response. If you don't mind
sticking
alert("receive " + ajaxRequest.responseText);
in there that would give a clue (hmm, maybe this should be logged...)
The most likely way in which the server could be sending a non-JSON
response is if you haven't installed all the prerequisites into
RabbitMQ. http://localhost:55670/ should show a generic list page like this:
RabbitMQ Web Server
Contexts available:
* rpc
* rabbitmq_lib
If you don't see that then check everything's installed.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware
More information about the rabbitmq-discuss
mailing list