You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by smallufo <sm...@gmail.com> on 2008/09/30 14:09:07 UTC
Is there a @PostParam annotation ?
Hi all
I am new to JSR-133
I feel comfortable to this restful style programming.
But I have a question.
I cannot find a @PostParam or something like that annotation.
I need this annotation for something like this :
@POST
@Path("/addUser")
public void addUser(@PostParam("name") String name ,
@PostParam("year") int year)
{...}
I feel it is very intuitive , but I cannot find such annotations , why ?
Or did I miss anything ?
Re: Is there a @PostParam annotation ?
Posted by Sergey Beryozkin <se...@iona.com>.
Hi
JAX-RS 0.9 introduces @FormParam - it is probably what you're after - CXF JAX-RS does not support it yet -
but the RI (Jersey) does. We'll support it too.
In meantime, you may want to try experimenting with
@POST
public void addUser(MultivaluedMap usersInfo) {
}
This should work fine...
Cheers, Sergey
> Hi all
> I am new to JSR-133
> I feel comfortable to this restful style programming.
> But I have a question.
> I cannot find a @PostParam or something like that annotation.
> I need this annotation for something like this :
>
> @POST
> @Path("/addUser")
> public void addUser(@PostParam("name") String name ,
> @PostParam("year") int year)
> {...}
>
> I feel it is very intuitive , but I cannot find such annotations , why ?
> Or did I miss anything ?
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland