Hi Gabo
I believe in your original post getObjects() had @Path("/"), right ?
In this last example the IE requests should be fine. What I meant was something
like this :
@GET
@Path("/get")
@WebMethod
public MyObjects getObjects(){
}
@GET
@Path("/get/")
@WebMethod
public Object getObject( @QueryParam("id")
@WebParam(name="id")
long id) {
}
in which case /get?id=1 will be delivered to getObject(), while /get/foo?id=1 /get/bar?id=1 or will be delivered to
getObjectProperty...
but it might not be acceptable for your specific case. Either way, I'll get it fixed for 2.2 (the issue highlighted by your original
example)
Cheers, Sergey
Hi Sergey,
Let me clarify that
Given:
@GET
@Path("/search/")
@WebMethod
public MyObjects getObjects(){
//this is the method that I was invoking... supposedly
//using a list wrapper as advised in the user's guide
return new MyObjects(new MyObject());
}
@GET
@Path("/")
@WebMethod
public Object getObject(
@QueryParam("id")
@WebParam(name="id")
long id) {
//this got invoked
return new MyObject();
}
URL: http://localhost:8080/cxf/rest/Objects/search?id=1
The case above only happens with IE giving all those extra headers.
Gabo
Sergey Beryozkin wrote:
Hi Gabo
Ok. If you could have both methods in ObjectService annotated with Path value which is a bit more specific than '/' then it will
also fix the problem, ex, URI ending with "/search" will get getObject() selected while those starting with "/search/*" will
result in a locator being invoked...
Cheers, Sergey