Hi

http://cwiki.apache.org/CXF20DOC/jax-rs.html

is there a complete download of the project someplace?

CXF JAXRS implementation is included in a CXF distribution. CXF JAXRS bundle is also available - I'll be spending much more time past 2.2 to ensure it plays nice on its own.


*** Noticed there is no class "Customers" nor "Product"

*** What is the definition that results in the following output for
Customer and Customers?
GET http://foobar.com/api/customers
<customers>
   <customer id="1005">John Doe</customer>
   <customer id="1006">Jane Doe</customer>
   ...

It's a section on how to use UriBuilder and UriInfo so the details of the actual classes like Customers/Customer and how they're serialized is not that important. You can imagine a Customer being nnotated with JAXB annotations, such that for ex 'id' is serialized as an attribute while theer's could be a custom MessageBodyWriter which produces a customers list...

</customers>

*** CODE IN INTERFACES?
public interface CustomerService {

Oops :-) Fixed this copy/paste piece now :-)

thanks, Sergey

   @PUT
   @Path("/customers/{id}")
   Response updateCustomer(@PathParam("id") Long id, Customer customer) {
       return Response.status(errorCode).build();
   }
   @POST
   @Path("/customers")
   Customer addCustomer(Customer customer) {
       throw new WebApplicationException(errorCode);
   }
}

thanks,

Reply via email to