Non en fait le problème n'est pas causé par l'appel, déjà l'écriture
MultivaluedMap<int, int> formData = new MultivaluedMapImpl()
n'est pas accepté pas le compilateur :
Syntax error on token "int", Dimensions expected after this token
et si tu remplaces int par Integer
MultivaluedMap<Integer, Integer> formData = new MultivaluedMapImpl()
ça ne lui plaît pas non plus
Type mismatch: cannot convert from MultivaluedMapImpl to MultivaluedMap<Integer,Integer>
et même si je remplace ça avec:
MultivaluedMapImpl formDataInt = new MultivaluedMapImpl();
ça ne marche pas non plus.
J'ai lu quelque part:
"JAX-RS/Jersey does not support the serialization of primitive types (or their Object counter parts).
If you want to support such types you need to implement your own message body writer and also declare an appropriate media type with that writer (the content-type of the response will use that, if @Produces does not declare it)."
Mais je ne sais pas comment faire cela 
Partager