Hi
On Thu, Jun 10, 2010 at 9:51 AM, antoine philippe chaker <
[email protected]> wrote:
> Hi ,
> I just want to know how to pass two parameters to a @POST annotated
> method.
> Here is the header of the method
>
> @SuppressWarnings("unchecked")
> @POST
> @Path("/insert/doc1")
> @Consumes( { "application/json", "application/xml", "text/xml" })
> @Produces( { "application/json", "application/xml", "text/xml" })
> public Response MyMethodToInsert(ObjectType1 object_1, ObjectType2
> object_2 ) {
> ....
> }
>
> Do both parameters represent a body ?
CXF JAXRS does not unwrap individual request body parts (it would be JAXRS
uncompliant anyway), example, given
<someRequest><part1/><part2/></someRequest>
you can only have
public Response MyMethodToInsert(SomeRequest bean) {
....
}
You can have up to one parameter representing a request body and unlimited
number of parameters mapping to various request URI parts or HTTP headers
cheers, Sergey
Thanks.
>