On Sat, Jul 10, 2010 at 5:39 PM, Jean-Sebastien Delfino <[email protected]> wrote: > I'm looking at the sample code in samples/webapps/helloworld-jaxrs [1] and > have the following questions: > > Is <implementation.web> required to use JAXRS? >
No > How is HelloWorldResource.java found in that example? I couldn't find a > reference to it in the composite... > Magic :) > Can I use JAXRS with <implementation.java>? > Yes > Can a JAXRS-enabled component produce ATOM? with XML or JSON entries? > Today, Somewhat, Yes, and Yes. See more details on the bottom of this e-mail > Is there support for JAXRS on references as well? Yes, using implementation.JAXRS > > Thanks > > [1] > http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/samples/webapps/helloworld-jaxrs/ > -- > Jean-Sebastien > The REST Binding has full support for JAX-RS using Apache Wink under the covers. If you want to produce Atom, currently you would use Wink native support for ATOM, which requires that the application developer create the feed using wink model objects that abstract ATOM entries instead of the more automatic way we do in our ATOM Binding. As for XML and JSON, you can configure the service with proper wireFormat to produce these types of payload. There is a good documentation for the REST binding in [1] and also several examples as unit tests in the binding-rest-runtime [2] and photark is using this for it's new REST api. If you have a specific scenario in mind, I could create a quick sample to demonstrate it's usage. [1] http://tuscany.apache.org/documentation-2x/sca-java-bindingrest.html [2] https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/ [3] http://svn.apache.org/repos/asf/incubator/photark/branches/photark-rest/ -- Luciano Resende http://people.apache.org/~lresende http://twitter.com/lresende1975 http://lresende.blogspot.com/
