JSON-RPC RemoteExporter for the Spring Framework

670 views
Skip to first unread message

Brian

unread,
Jun 9, 2009, 7:11:17 PM6/9/09
to JSON-RPC
I've created a project over at <a href="http://code.google.com/p/
spring-jsonrpc/">http://code.google.com/p/spring-jsonrpc/</a>. It
uses spring's RemoteExporter to expose a java based service as a JSON-
RPC service without any extra work to the programmer (just a 3-4 line
bean configuration in your bean context file). We're using it at
BigStage Entertainment. It was implemented using the spec described
on this website.

Brian

unread,
Jun 9, 2009, 7:15:34 PM6/9/09
to JSON-RPC
Screwed that HTML up, here it is in good format:

I've created a project over at:

http://code.google.com/p/spring-jsonrpc/ .

Brian

unread,
Jun 25, 2009, 2:35:31 PM6/25/09
to JSON-RPC

Krull

unread,
Jul 1, 2009, 3:32:04 AM7/1/09
to JSON-RPC
I was playing around with the json-rpc and it works really fine, but I
missing client side examples on how to invoke my spring services. Can
someone provide me with some simple java script examples? Maybe also
update the example on the first page with the client side...

Cheers,

Christer

Brian

unread,
Jul 6, 2009, 8:45:07 PM7/6/09
to JSON-RPC


On Jul 1, 12:32 am, Krull <christer.wik...@gmail.com> wrote:
> I was playing around with the json-rpc and it works really fine, but I
> missing client side examples on how to invoke my spring services. Can
> someone provide me with some simple java script examples? Maybe also
> update the example on the first page with the client side...

quick and dirty example that uses prototype's AJAX library:

var jsonRpcRequest = {
"jsonrpc": "2.0",
"method": "round",
"id": "whatever",
"params": [1124124.1241]
};

new Ajax.Request("http://www.example.com/RoundingService.json", {
asynchronous: false,
method: "POST",
postBody: jsonRpcRequest,
contentType: "application/json",
requestHeaders: { "Accept": "application/json" },

onSuccess: function(transport) {
alert(transport.responseText);
},

onFailure: function(transport) {
alert("ERROR!\n"+transport.responseText);
}

});

We're working on a java client.
Reply all
Reply to author
Forward
0 new messages