cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <sergey.beryoz...@iona.com>
Subject Re: JAX-RS sample in 2.1 trunk has wierd behavior on GET
Date Thu, 06 Mar 2008 16:57:16 GMT
Hi

I haven't updated the demos after CXF JAX-RS has been upgraded to 0.5 version of jsr-311 api
as the 0.6 version is already available and it will break the user code again. Tomorrow a
0.6 version should become publicly available in the java.net maven repository and the demo
will be updated in sync with the upgrade to 0.6. 

That said, an upgrade to 0.6 may take few days, so we'll do an upgrade to 0.5 now. Sorry about
the hassle...

Have you updated the demo yourself to make it compile with 0.5 ?

Cheers, Sergey


> Hi,
> 
> I am trying to run the JAX-RS sample bundled in the 2.1 trunk. I am trying to add /customers/
GET which returns all the customers under that resource. But, I see some wierd behavior when
I try to access from the browser. I added 3 customers in the init() method which populates
the map once the server is started.
> Both the GET calls to /customers and /customers/1 returns 3 customer instances. Here
is my sample lookslike:
> 
>    @GET
>    @Path("/customers/")
>    public Customers getCustomers() {
>        System.out.println("----invoking getCustomers");
>        Customers e = new Customers();
>        e.setCustomer(customers.values());
>        return e;
>    }
> 
>    @GET
>    @Path("/customers/{id}/")
>    public Customer getCustomer(@UriParam("id") String id) {
>        System.out.println("----invoking getCustomer, Customer id is: " + id);
>        long idNumber = Long.parseLong(id);
>        Customer c = customers.get(idNumber);
>        return c;
>    }
> 
> 
> Am I missing something?
> 
> Please clarify.
> 
> Regards
> Arul
>

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

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