[ 
https://issues.apache.org/jira/browse/CXF-8089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16909750#comment-16909750
 ] 

Andriy Redko commented on CXF-8089:
-----------------------------------

Just to clarify this feature, which is CXF-specific in fact, as per [RFC-6570: 
URI Template|https://tools.ietf.org/html/rfc6570] 
([https://tools.ietf.org/html/rfc6570]), the query parameters should be 
repeated to represent multiple values.
{noformat}
   An explode modifier applied to a list variable causes the expansion
   to iterate over the list's member values.  For path and query
   parameter expansions, each member value is paired with the variable's
   name as a (varname, value) pair.  This allows path and query
   parameters to be repeated for multiple values, as in

     Given the variable assignments

       year  := ("1965", "2000", "2012")
       dom   := ("example", "com")

     Example Template     Expansion

       find{?year*}       find?year=1965&year=2000&year=2012
       www{.dom*}         www.example.com
{noformat}

> Build Comma Separated Values in url from Array/List Query Param
> ---------------------------------------------------------------
>
>                 Key: CXF-8089
>                 URL: https://issues.apache.org/jira/browse/CXF-8089
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.2.10, 3.3.3
>            Reporter: Sridhar
>            Assignee: Andriy Redko
>            Priority: Minor
>             Fix For: 3.4.0, 3.2.11, 3.3.4
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://issues.apache.org/jira/browse/CXF-6941
> Issue reported above is get comma separated values as List on Server side 
> (for Query Param).
> [http://localhost:8080/MovieDB/GetJson?name=Actor1,Actor2,Actor3&startDate=20120101&endDate=2012050|http://localhost:8080/MovieDB/GetJson?name=Actor1,Actor2,Actor3&startDate=20120101&endDate=20120505]
> But for Jaxrs- CXF client, when we are trying to build URL from a List or 
> Array, I don't see a way to build URL as comma separated values 
> The solution provided to use "parse.query.value.as.collection" contextual 
> property is not used in org.apache.cxf.jaxrs.client.AbstractClient and  
> org.apache.cxf.jaxrs.impl.UriBuilderImpl
> And works only on server side while receiving request, not on client side 
> (i.e while building URL from List). 
> Switching to "multi" option for query param means, I need to ask all existing 
> clients to update the way they build URL, which is not feasible.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to