You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by sourashis <so...@gmail.com> on 2008/09/28 12:30:56 UTC

REST service url resolution question

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
  
-- 
View this message in context: http://www.nabble.com/REST-service-url-resolution-question-tp19710431p19710431.html
Sent from the cxf-user mailing list archive at Nabble.com.