cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-6941) Send Comma Separated Array in uril request
Date Mon, 20 Jun 2016 09:36:05 GMT


Sergey Beryozkin commented on CXF-6941:

Hi Neal

Why sending multiple parameters with the same name causes a problem, do you have a JAX-RS
client talking to a Spring MVC server and the server fails to correctly populate the array
? It is a classical case, for example, HttpServletRequest can understand it and return you
a list of values for a given parameter name.

Bundling multiple values into a single value is a custom option which is marginally more optimal
but it is less interoperable as you can see, for example, if you have a pure Servlet application
then HttpServletRequest won't be able to understand that it is a multi-value property, it
will be a single value with commas in it which the user code will need to parse itself. 

Please provide more details

Cheers, Sergey

> Send Comma Separated Array in uril request
> ------------------------------------------
>                 Key: CXF-6941
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 3.1.6
>         Environment: Mac
>            Reporter: Neal Hu
>             Fix For: 3.2.0, 3.1.8
> Spring MVC and PHP support send comma separated array in the url request:
> http://localhost:8080/MovieDB/GetJson?name=Actor1,Actor2,Actor3&startDate=20120101&endDate=20120505
> @RequestMapping(value = "/GetJson", method = RequestMethod.GET) 
> public void getJson(@RequestParam("name") String[] ticker, @RequestParam("startDate")
String startDate, @RequestParam("endDate") String endDate) {
>    //code to get results from db for those params.
>  }
> Now jax-rs only support below:
> http://localhost:8080/JerseyPojo/jaxrs/BasicResource/test?nameList=xx&nameList=xxx&nameList=ddd
> @Path("/test")
>     @GET
>     public String getQueryList([]
> When we migrate from Spring MVC to jax-rs, found problem.
> Neal

This message was sent by Atlassian JIRA

View raw message