Hi,
I am trying to use CXF for building some REST services. However I
am having some problems trying to resolve the urls. It seesm that CXF
only resolves the url to API call based on the path annotation and
does not take into account the queryparam annotation. For example I
have 2 API calls
@GET
@Path("/employee/{employeeId}/hello/{helloId}")
public Employee getEmployee2(@PathParam("employeeId")
String employeeId,@PathParam("helloId")String
helloId,@QueryParam("hi2") String val)
{
//Do something
}
@GET
@Path("/employee/{employeeId}/hello/{helloId}")
public Employee getEmployee1(@PathParam("employeeId")
String employeeId,@PathParam("helloId")String
helloId,@QueryParam("hi1") String val)
{
//Do something
}
For the 2 calls the @Path annotation is the same but if you
look at the @QueryParam annotation
they are different (one take "hi1" and the other takes "hi2").
However, CXF doesnt seem to recognize
this. It always calls the same function irrespective of
whether we pass hi1 or hi2 as the query
parameter. Is there some way to tell CXF to distinguish
between the two urls.
I need to resolve this issue pretty urgently and I will
appreciate any help in this regard.
Regards
Sourashis