users@jsr311.java.net

Re: entity providers and multiple arguments of the same type

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 03 Jun 2008 17:04:34 -0400

On Jun 3, 2008, at 4:43 PM, Bertold Kolics wrote:

> Is it possible to have a resource method with multiple arguments of
> the the same type if none of these arguments are mapped to URI
> parameters? For example:
>
> @POST
> @Path("service")
> public Response resourceMethod(ServiceClass argument1, ServiceClass
> argument2);
>
No, section 3.3.2 of the specification forbids this:

"The value of a non-annotated parameter, called the entity parameter,
is mapped from the request entity body. Resource methods MUST NOT have
more than one parameter that is not annotated with one of the above-
listed annotations."

> It would be great if Providers were added to the terminology section
> (1.5).

OK, i'll add them.

> I felt that the Constructors (4.2) section should be numbered 4.1.1.
> Otherwise, it looks like yet another type of provider.
>
Good idea, i'll do that.

Thanks,
Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.