json-rpc

#1

Is there a way (best) to make autobahn use the json-rpc protocol?

0 Likes

#2

I should clarify a little why I was asking for json-rpc and the answer to that is for server side error handling ,meaning read the errors on the client side especially for debugging.
currently all my responses follow the json-rpc like format of

{

method: add,

params :[1,2],

success:1,

errors: 0,

msg: 3

}

The problem with my java-script now is that it seems like I have to do error handling twice, once for the server and once with the wamp protocol (this may be true of json-rpc too).

Is there a best way to go about this without unnecessary redundancies?

0 Likes

#3

No, I'm afraid, the Autobahn project provides implementations of the WebSocket and WAMP protocols.

/Tobias

···

Am 17.12.2013 01:17, schrieb James Rubino:

Is there a way (best) to make autobahn use the json-rpc protocol?

0 Likes

#4

Yes. You should use WAMP call success and error returns instead of wrapping both RPC application successes and errors within WAMP call success messages.

/Tobias

···

Am 17.12.2013 04:06, schrieb James Rubino:

I should clarify a little why I was asking for json-rpc and the answer
to that is for server side error handling ,meaning read the errors on
the client side especially for debugging.
currently all my responses follow the json-rpc like format of
{
   method: add,
   params :[1,2],
   success:1,
   errors: 0,
   msg: 3
}

The problem with my java-script now is that it seems like I have to do
error handling twice, once for the server and once with the wamp
protocol (this may be true of json-rpc too).
Is there a best way to go about this without unnecessary redundancies?

0 Likes