Re: LEWOStuff (the stuff with JSON-RPC!)
Re: LEWOStuff (the stuff with JSON-RPC!)
- Subject: Re: LEWOStuff (the stuff with JSON-RPC!)
- From: Andrew Lindesay <email@hidden>
- Date: Wed, 11 Jun 2008 13:19:34 +1200
Hello David;
Just grab "LEWOStuff.jar" and "stick it into your project". No other
dependencies. Then do this;
import nz.co.lindesay.common.webobjects.jsonrpc.*;
public class Application extends WOApplication implements
LEWOJSONRPCApplicationInterface
{
public Application() {
...
LEWOJSONRPCRegistry reg = LEWOJSONRPCRegistry.singleton();
reg.addPackageForActions("nz.co.foo.jsonrpc.actions"); <--- this is
the package where your action classes live
registerRequestHandler(new LEWOJSONRPCRequestHandler(),
JSONRPCRequestHandlerKey());
...
}
public String JSONRPCRequestHandlerKey() { return "jrpc"; }
}
That sets the basic stuff-up. There is error and session-timeout
handling to worry about, but you will have to copy that handling from
LEWOApplication.
cheers.
Okay, first question:
All I really want to put into my project right now is the JSON-RPC
stuff. How do I go about adding just that framework and it's
dependencies?
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden