-
Bug
-
Resolution: Done
-
Critical
-
3.0.4.Final
-
None
I tried to upload an attachment via Multipart. For that i use the client proxy api.
The proxy interface has a method like this:
@Path("test/{key}") @Consumes("multipart/form-data") @POST public void postAttachment(@MultipartForm Attachment attachment, @PathParam("key") String key)
When i generate the proxy with the old ProxyFactory it can send the POST, but an exception is thrown with the new ResteasyClientBuilder:
javax.ws.rs.ProcessingException: could not find writer for content-type multipart/form-data type: de.markant.anwendkart.client.Attachment
The problem seems to be, that the variable "annotations" in ResteasyProviderFactory.getClientMessageBodyWriter() is not correctly filled with a proxy generated by the new ResteasyClientBuilder. Without it, the correct MessageBodyWriter(MultipartFormAnnotationWriter) is not used.
The test project i used is attached.
- relates to
-
RESTEASY-1001 client proxy isn't setting entity annotations on request
- Closed