I have Rest WS with pathparam like
@Path("/myService/{types}")
public Response myFunction(@Context HttpServletRequest request
,@PathParam("types")String[] types)
{
Criteria criteria = session.createCriteria(myObject.class);
criteria.add(Restrictions.in("tranType", types));
List<myObject> lst= (List<myObject>) criteria.list()
}
or there may have ArrayList or List with the place String[]
I am trying to call this WS from browser.when i am calling it with 1 parameter in array it is working fine. WS call is like /myService/type1
.
but when i want to call it with 2 or more parameters in array it is not working. response is empty array but it must return fill array . I am calling WS with many parameters like /myService/type1,type2
and it is not working , i tried /myService/{type1,type2}
too and /myService/[type1,type2]
and /myService/["type1","type2"]
and /myService/"type1","type2"
but unfortunately nothing works . Can you tell me how can i do it ?