I’ve been working with the Restlet library for the last couple weeks and from what I can see it is fairly impressive. The ability to be able to define a common interface for consumption by both the client and server surpasses any messy soap frameworks I’ve worked with.
However, something has been plaguing my mind that I just can get past:
Is there a good way to define Restlets with many methods?
My primary use case is that I have a soap web service that has 10-15 or so methods in it. As I see it, if I wish to translate this over to a Restlet I will need to separate this out into 8-15 interfaces depending on which methods become get methods vs post or put – I don’t think you can have more than one verb method (get, post, put, etc) per interface. This seems like a cumbersome and clumsy solution.
I’ve thought of using some type of factory\map technique to mitigate this – but I wanted to make sure I’m not missing something better first.
Thanks
There’s a JAX-RS extension for Restlet. JAX-RS provides the
@Pathannotation that is used identify the URI of the resource. Paths can be attached either to the type or to a method. Routing should be then done by the container instead of explicitly defining router rules.