On Fri, Aug 27, 2010 at 12:05 AM, ant elder <[email protected]> wrote: > Is binding.rest supposed to work with arbitrary services that don't > have any jaxrs annotations? And if so how do you configure it to do > that? >
The REST Binding is a superset of the HTTP Binding, so other then the regular support for Collection interface that would do the HTTP Operation mapping to Collection operations and Servlet interface support, you can also use JAX-RS Annotations for the mapping or use RPC style invocation over HTTP Get. Note that full support for references, particular in some configurations (e.g rpc over get) , is not yet available. A JavaScript proxy client is being integrated to Implementation Widget, > I'm trying it with the sample at: > > https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/contrib/samples/hema/ > > The service interface is: > > @Remotable > public interface HelloworldService { > String sayHello(String name); > } > > And i've tried varrious binding configs such as: > > <tuscany:binding.rest name="rest"> > <tuscany:wireFormat.json /> > <tuscany:operationSelector.rpc /> > </tuscany:binding.rest> > > but only get errors such as IllegalArgumentException: wrong number of > arguments > I'd try: <tuscany:binding.rest name="rest"> <tuscany:operationSelector.rpc /> <tuscany:response> <tuscany:wireFormat.json /> </tuscany:response> </tuscany:binding.rest> This would then be accessible via URL <base service URI> ?method=<operation name>&parm1=<value>&parm2=<value> More details at http://tuscany.apache.org/documentation-2x/sca-java-bindingrest.html > Any comments? > > ...ant > -- Luciano Resende http://people.apache.org/~lresende http://twitter.com/lresende1975 http://lresende.blogspot.com/
