How to submit multiple entities to the post method from jersey client program?
问题 I am trying to pass multiple entities to the web service method. The web service method has two parameters of pojo entity type. I am able to post only one entity to the web service method. I am unable to post multiple entities to the web service method. Server side code: @POST @Path("/test") @Produces(MediaType.APPLICATION_XML) @Consumes(MediaType.APPLICATION_XML) public void testMethod(Emp emp, Student stud){ ... } Client side code: ... ... Emp emp = new Emp; Student stud = new Student();