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

Reply via email to