Greetings,

I have a JAX-RS resource which is declared as an @GET method.  Two of the
input parameters are POJOs and I am having trouble figuring out what the URI
is to submit the request (using SoapUI to test).

To keep things simple, let us consider the following:

class interface Test {
   @GET
   @Produces("application/xml")
   @Path("/getData")
   public EmployeeDetails getData(@QueryParam("employee") Employee
employee);
}

If the Employee POJO is declared as:

@XmlRootElement(name="employee")
public class Employee {
   private int id;
   private String name;

   public int getId() {
      return id;
   }

   public void setId(int id) {
      this.id = id;
   }

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }
}

I would expect to be able to submit the following, but I cannot figure out
the exact format:
   http://<end-point>/getData?employee.id=301&employee.name=Bob
or
   http://<end-point>/getData?employee/id/301&employee/name/Bob

Could someone please point out where my mistake is.

Thanks, Ian

-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/JAX-RS-GET-request-with-POJO-as-QueryParam-tp3385354p3385354.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to