users@jersey.java.net

[Jersey] Re: Passing an object to rest service using jersey

From: indhums2011 <manzams_at_gmail.com>
Date: Fri, 25 Nov 2011 02:22:31 -0800 (PST)

Hi,

    I tried a lot, but didn't get any examples related to this topic. Can u
plz give a link for this.
I tried the following in my code,

MultivaluedMap queryParams=new MultivaluedMapImpl();
       
       queryParams.add("name", "name");
       queryParams.add("title", "title");
       queryParams.add("description", "descript");
       queryParams.add("questions", new Questions{"qtitle","qlang","qdesc");
      
webResource.path("create").queryParams(queryParams).accept(MediaType.APPLICATION_JSON_TYPE,
MediaType.APPLICATION_XML_TYPE).get(responseType)

But getting java.lang.ClassCastException: [Ljava.lang.String; cannot be cast
to java.lang.String


Thanks and Regards




--
View this message in context: http://jersey.576304.n2.nabble.com/Passing-an-object-to-rest-service-using-jersey-tp7027988p7030624.html
Sent from the Jersey mailing list archive at Nabble.com.