Hello,
I have a similar problem with version 1.6. I previously used the following
codes with version 1.1.5 which worked fine for me:
Here is the client side code:
final WebResource resource =
IntranetUtil.getJerseyClient().resource(baseUrl + "/theService");
FormDataMultiPart formData;
formData = new FormDataMultiPart();
formData.field("schema", "THESCHEMA", MediaType.TEXT_PLAIN_TYPE);
formData.field("table", "THETABLE", MediaType.TEXT_PLAIN_TYPE);
formData.field("authUser", "THEUSER", MediaType.TEXT_PLAIN_TYPE);
final String result =
resource.type("multipart/form-data").post(String.class, formData);
formData.close();
return result;
And her the server side:
@POST
@Path("theService")
@Consumes("multipart/form-data")
public String theService(
@DefaultValue("") @FormParam("schema") final String schema,
@DefaultValue("") @FormParam("table") final String table,
@DefaultValue("") @FormParam("authUser") final String authUser)
throws Exception
{
...
}
In my "theService" method I could use the parameters "schema", "table", etc.
directly as usual.
After switching to version 1.6 I have the problem, that on the server side
all form fields are empty/not set now. I had to roll back to version 1.1.5
for now since this was production code.
How can I fix this (ofcourse I don't want to stay with that very old
version)?
Kind regards
Stephan Knull
--
View this message in context: http://jersey.576304.n2.nabble.com/SEVERE-A-message-body-reader-for-Java-class-com-sun-jersey-multipart-FormDataMultiPart-and-Java-typed-tp5969276p6326476.html
Sent from the Jersey mailing list archive at Nabble.com.