Sorry, I provided here an inadvertent code of the client. The current one is
as follows:

    List<Attachment> attachments = new ArrayList<Attachment>();
    TransactionContextDTO ctx = new TransactionContextDTO();
    attachments.add(new Attachment("create-transaction-context",
MediaType.APPLICATION_JSON, ctx));
    List<FileInputStream> contracts = new ArrayList<FileInputStream>();
    contracts.add(new FileInputStream (new File ("test.pdf")));
    attachments.add(new Attachment ("contracts",
MediaType.APPLICATION_OCTET_STREAM, contracts));
    Response resp = client.target(new
URI("http://localhost:9081/qs/services/api/createTransaction";)).request().post(Entity.entity(new
MultipartBody(attachments), MediaType.MULTIPART_FORM_DATA));
    assertEquals (200, resp.getStatus());


kind regards,

Nicolas



--
View this message in context: 
http://cxf.547215.n5.nabble.com/HTTP-415-raised-by-JAX-RS-service-consuming-multipart-tp5780784p5780818.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to