MyEclipse: taking more than id

ynaeht - Apr 21, 2011 - 04:43 PM
Post subject: taking more than id
I am following the tutorial and would like for the GET to filter on "id" and "name".
Is the below code correct? And what should the url be to make that request?

http://localhost:8080/restdemo/services/customers?id=0&Name="xx"

@GET
@Path("{id}")
public Customer getCustomer(@PathParam("id") int cId,
@PathParam("name") String cName) {
return customerMap.get(cId);
}
support-swapna - Apr 26, 2011 - 10:25 AM
Post subject: RE: taking more than id
ynaeht,

The code is right.

The URL should be in this format :
http://localhost:8080/restdemo/services/customers/1?name="xx"

Hope this helps.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits