I need to take an incoming file and send it to a third party.  For
memory purposes, I'm dealing with InputStreams on the fly.  I've copied
the code essentially from the jaxrs Multipart page on the CXF website,
from the section uploading files....

WebClient client = WebClient.create(<endpoint removed>)
        .accept(MediaType.APPLICATION_JSON)
        .type(MediaType.MULTIPART_FORM_DATA_TYPE);
ContentDisposition cd= new ContentDisposition("form-data; name=\"file\";
filename=\""+consult.getFilename()+"\"");
Attachment att = new Attachment("file", new ByteArrayInputStream(file),
cd);
MultipartBody body = new MultipartBody(att);
String resp = client.post(body, String.class);

However, when I run this code, I get:
No message body writer found for class : class
org.apache.cxf.jaxrs.ext.multipart.MultipartBody

Am I using the wrong class or did I not configure something correctly?
Any help would be greatly appreciated.

Thanks!
Jeff Wang

Reply via email to