If the number of parameters are fixed you can try
"/products/{productIdOne}/{productIdTwo}"
--
View this message in context:
http://cxf.547215.n5.nabble.com/JAX-RS-specifying-multiple-values-in-a-pathparam-tp555098p5727586.html
Sent from the cxf-user mailing list archive at Nabble.com.
This is what I ended up going with. I turned my parameter into a string and
went with a path like:
/products/123,456,789
and manually chopped it up and turned them into longs.
Thanks for the suggestions,
Tim
So may be you can use ',' as a separator between multiple params in a single
path
So may be you can use ',' as a separator between multiple params in a single
path segment then ?
Cheers, Sergey
-Original Message-
From: Tim Morrow 2 [mailto:[EMAIL PROTECTED]
Sent: 09 June 2008 20:36
To: users@cxf.apache.org
Subject: RE: JAX-RS specifying multiple values in a
>
> -Original Message-
> From: Tim Morrow 2 [mailto:[EMAIL PROTECTED]
> Sent: 09 June 2008 17:51
> To: users@cxf.apache.org
> Subject: Re: JAX-RS specifying multiple values in a pathparam
>
>
> Couple more points:
>
> * A properly escaped semi-colon (%3B)
Hi
Perhaps you can do (note the trailing '/')
@Path("/{id1};{id2};{id3}/")
And then just do /1;2;3/ ?
Cheers, Sergey
-Original Message-
From: Tim Morrow 2 [mailto:[EMAIL PROTECTED]
Sent: 09 June 2008 17:51
To: users@cxf.apache.org
Subject: Re: JAX-RS specifying
Couple more points:
* A properly escaped semi-colon (%3B) is preserved by getPathInfo.
* http://www.ietf.org/rfc/rfc2396.txt section 3.3 states that ";" delimits a
sequence of parameters in a path segment. Whatever that means. Not sure
why its dropped by getPathInfo().
* Specifying "/{id}" an
Tim Morrow 2 wrote:
Thanks for the suggestions. I could work with an upper limit of values rather
than an open ended list.
I tried @Path("/{id1};{id2};{id3}") with 3 @PathParam parameters but got a
"No operation matching request path ... is found" error.
I also tried keeping @Path("/{id}") mapp
BTW, a properly escaped semi-colon (%3B) is preserved by getPathInfo.
http://www.ietf.org/rfc/rfc2396.txt section 3.3 states that ";" delimits a
sequence of parameters in a path segment. Whatever that means. Not sure
why its dropped by getPathInfo().
I'm in over my head.
:)
Tim
Tim Morro
Thanks for the suggestions. I could work with an upper limit of values rather
than an open ended list.
I tried @Path("/{id1};{id2};{id3}") with 3 @PathParam parameters but got a
"No operation matching request path ... is found" error.
I also tried keeping @Path("/{id}") mapping to a String param
Hi
Would PathParam("{id1};{id2};{id3}") work ?
Or are you thinking of being able to handle a different number of product ids
per request ?
Perhaps the simpliest way would be to do
PathParam("productIds") String
and then String.split(";") in the function body
I'm not sure JAX-RS provides for
10 matches
Mail list logo