2

I've annotated this method as follow:

@PUT
@Path("/categorize")
public abstract Response categorize(
    @HeaderParam(value = "resourceIds") List<String> resourceIds,
    List<MetaInfoValueDTO> metainfos);

As you can see, I'm trying to receive a List<String>. My client sends this strings using a comma separated format: "s1, s2, s3". The problem is JAX-RS deserialize this received string in one element: so resourceIds is a List<String> with one element.

Can I modify this behavior? Note: I'm using a generic Java EE libraries in order to build my JAX-RS application: providedCompile 'org.jboss.spec:jboss-javaee-7.0:1.0.3.Final'

cassiomolin
  • 124,154
  • 35
  • 280
  • 359
Jordi
  • 20,868
  • 39
  • 149
  • 333
  • Possible duplicate of https://stackoverflow.com/questions/42884930/jax-rs-headerparam-with-list-populated-with-only-one-comma-separated-element – kfateem Sep 15 '17 at 08:30

0 Answers0