We use the proxy client for all our webservices; that proxy is an
excellent productivity enhancer. We originally wrote our Jersey
webservices using Jersey 1.8. Many of our resource methods take query
params of type java.util.Date. Here's one example (abbreviated):
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("summary/customer/{custId}")
public List<TicketData> getCustomerSummary (
@PathParam("custId") String custId,
@QueryParam("startDate") Date startDate,
@QueryParam("endDate") Date endDate, @QueryParam("startIndex")
int startIndex, @QueryParam("count") int count);
This works fine with Jersey 1. However, when we upgraded the project to
use Jersey 2, we now get 404 Not Found if either of the supplied dates
is non-null; if they are both null, then the method still works.
This seems to be a server-side issue. I ran both a 1.8 client and a 2.9
client against the 1.8 server version, and both worked. But neither
works against the 2.9 server version.
I turned on the LoggingFilter to see what URL gets to the server; both
1.8 and 2.9 produce the same thing:
http://localhost:8081/api/rest/v1/ticket/summary/customer/MC000577?
status=Open&severity=1,3,5&startDate=Fri+May+10+00:00:00+EDT+2013&startIndex=0&count=100
I'd appreciate some pointers on how to get this working under 2.9. This
is one of our last hurdles for the upgrade.
Thanks.
--
Guy Rouillier
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com