Hi,
Use case: there is JAXRS service interface containing two POST methods:
@POST
@Path("{userId}/status")
Customer activate(@PathParam("userId") long userId,
@QueryParam("token") String token);
@POST
@Path("{userId}/status")
Customer activate(@PathParam("userId") long userId,
@QueryParam("token") String token,
SyncPolicyTO policyTO);
Both methods have the same URL, the difference is just that the first one
expects no request body and the second one expects policyTO object in the
request body.
Question: is it basically possible for runtime to match resource method based
on this criteria?
I didn't find explicit statement regarding it in the JAXRS spec.
Currently for CXF:
a) In case if method has @QueryParam, I always receive either BadRequest
error from the service by call activate()
b) If method has no @QueryParam, the first method is always called
Looks a little bit strange for me.
Any ideas how it should work?
Regards,
Andrei.