You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Barry Fitzgerald <ba...@gmail.com> on 2008/03/03 12:54:51 UTC

Re: JAX-RS Form Encoding Provider

Hi,

Patch added at: https://issues.apache.org/jira/browse/CXF-1455

This also adds the provider to the list of default providers which I presume
is needed for the spec.

Barry

On Thu, Feb 28, 2008 at 11:00 AM, Sergey Beryozkin <
sergey.beryozkin@iona.com> wrote:

> Hi Barry
>
> This is great. Perhaps you may still want to support Map<String, String>
> as well, I was wrong suggesting it would spec uncompliant, the spec requires
> MultivaluedMap<String, String>, but as long as there's a provider to support
> Map<String, String>, then it would be fine...
>
> The only possible problem with Map<String, String>, is that, as far as I
> rememeber, one may have mutiple values for a given key in a form request :
>
> input=bar&input=foo, thus a String value will make it more difficult to
> handle such cases.
>
> MultivaluedMap<String, String> is really a Map<String, List<String>>. It
> has methods like getSingle, so if you know that in your own application no
> multiple values are possible, then you can use getSingle() to avoid dealing
> with Lists.
> From the provider's perspective, perhaps add(key, value) should be used,
> as it will append values to the list if it already exists
>
> Thanks, Sergey
>
>
> > Thanks Sergey,
> >
> > I've created a sub task for this:
> > https://issues.apache.org/jira/browse/CXF-1455
> >
> > I'll tidy up my code, change it to use MultivaluedMap and create a
> patch.
> >
> > Barry
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>

Re: JAX-RS Form Encoding Provider

Posted by Sergey Beryozkin <se...@iona.com>.
Hi Barry

> This also adds the provider to the list of default providers which I presume
> is needed for the spec.

Thanks. We'll eventually get rid of the explicit allocation of default providers in the code...

Cheers, Sergey 


> Hi,
> 
> Patch added at: https://issues.apache.org/jira/browse/CXF-1455
> 
> This also adds the provider to the list of default providers which I presume
> is needed for the spec.
> 
> Barry
> 
> On Thu, Feb 28, 2008 at 11:00 AM, Sergey Beryozkin <
> sergey.beryozkin@iona.com> wrote:
> 
>> Hi Barry
>>
>> This is great. Perhaps you may still want to support Map<String, String>
>> as well, I was wrong suggesting it would spec uncompliant, the spec requires
>> MultivaluedMap<String, String>, but as long as there's a provider to support
>> Map<String, String>, then it would be fine...
>>
>> The only possible problem with Map<String, String>, is that, as far as I
>> rememeber, one may have mutiple values for a given key in a form request :
>>
>> input=bar&input=foo, thus a String value will make it more difficult to
>> handle such cases.
>>
>> MultivaluedMap<String, String> is really a Map<String, List<String>>. It
>> has methods like getSingle, so if you know that in your own application no
>> multiple values are possible, then you can use getSingle() to avoid dealing
>> with Lists.
>> From the provider's perspective, perhaps add(key, value) should be used,
>> as it will append values to the list if it already exists
>>
>> Thanks, Sergey
>>
>>
>> > Thanks Sergey,
>> >
>> > I've created a sub task for this:
>> > https://issues.apache.org/jira/browse/CXF-1455
>> >
>> > I'll tidy up my code, change it to use MultivaluedMap and create a
>> patch.
>> >
>> > Barry
>>
>> ----------------------------
>> IONA Technologies PLC (registered in Ireland)
>> Registered Number: 171387
>> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>>
>

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland