cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Zoerner <ryanzoer...@gmail.com>
Subject Re: Questions regarding the implementation of a 2-endpoint Customer and CustomerService CXF JAX-RS web application
Date Fri, 13 May 2011 09:54:07 GMT
Hi Sergey,

You mentioned that Customer should display a single customer. Does
CustomerService instantiate that Customer? By what mechanism? I created this
class to try and get around that problem. In the old demo, Customers were
instantiated in CustomerService, however, if you have CustomerService being
called by Customer to get its Customer to display, does that make sense to
you? The server would call getCustomer and the createCustomer method would
act like init() on an individual call basis.

I may have questions about your response that I just read, but I am too
tired right now to develop them.
 ----------------------------------------------------------------
public Customer()
 {
    @Path("/name/none/id/none/")
    public Customer getCustomer()

    @Path("/name/{name: [a-zA-Z]+}/id/none}")
    public Customer getCustomer(@PathParam("name") String name)

    @Path("/name/none/id/{id: [0-9]+)")
    public Customer getCustomer(@PathParam("id") long id)

    @Path("/name/{name: [a-zA-Z]+}/id/{id: [0-9]+)")
    public Customer getCustomer(@PathParam("name") String name,
        @PathParam("id") long id)

    @GET
    private Customer createCustomer()

    @GET
    private Customer createCustomer(String name)

    @GET
    private Customer createCustomer(long id)

    @GET
    private Customer createCustomer(String name, long id)
}
 -----------------------------------------------------------------------------------------------------------

Thank you,
Ryan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message