Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated documentation with 0.3.1 changes
Info
titleVersion status: 0.3.0 1 stable - used in production

Uses RestEASY 2. 3.0.GA -beta-4 and Tapestry 5.3.x

for older versions check the version table

...

Code Block
        <dependency>
            <groupId>org.tynamo</groupId>
            <artifactId>tapestry-resteasy</artifactId>
            <version>0.3.0<1</version>
        </dependency>

No need to edit your web.xml.

...

Code Block
<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jettison-provider</artifactId>
    <version>2<version>3.0.1.GA<-beta-4</version>
</dependency>

 

If you don't need JAXB and only you only need JSON support, you can use the JSON marshaller/unmarshaller provided by the resteasy-jackson-provider library. I personally find Jackson's output format more intuitive than the format provided by either BadgerFish or Jettison.

Code Block
<dependency>
	<groupId>org.jboss.resteasy</groupId>
	<artifactId>resteasy-jackson-provider</artifactId>
	<version>2<version>3.3.0.GA<0-beta-4</version>
</dependency>

You could use JAXB and Jackson together but be aware of the possible conflicts with the JAXB providers

...

Note

Available since tapestry-resteasy 0.2.1!

The only thing you need to do Reloading is limited to services that can be proxied, so to enable live class reloading for your REST services is you need to bind create them as regular Tapestry IoC services and with an interface and an implementation of that interface. You then have the option to leave them both in the autodiscovery package or explicitly bind them as services and contribute them to javax.ws.rs.core.Application.class. Read more about how service implementation reloading works in: http://tapestry.apache.org/reload.html

Here is an example from the tapestry-resteasy test suite.

Code Block
public static void bind(ServiceBinder binder)
{
	binder.bind(ReloadableEchoResource.class, ReloadableEchoResourceImpl.class);
}

@Contribute(javax.ws.rs.core.Application.class)
public static void configureRestResources(Configuration<Object> singletons, ReloadableEchoResource reloadableEchoResource)
{
	singletons.add(reloadableEchoResource);
}
Note
One more thing: DO NOT put this service in the autodiscovery package.


Enjoy

...

Check google for more information: http://www.google.com/search?hl=en&q=com.sun.xml.stream.ZephyrParserFactory+cannot+be+cast+to+org.codehaus.stax2.XMLInputFactory2&aq=f&oq=&aqi=

 

version table

 

tapestry-resteasyTapestryRESTEasynotes:
0.0.15.1.x1.1.GAsee tapestry-resteasy-0.0.1 guide
0.2.15.2.x2.0.1.GA 
0.3.05.3.x2.3.0.GA 
0.3.15.3.x3.0-beta-4