In case anybody stumble upon the same thing, here is how I did it (not using
Multipart Dataformat):
...
.bean(UploadBean.class, "createMultipartEntity")
...
public HttpEntity createMultipartEntity(@ExchangeProperty("invoice") String
invoice, @ExchangeProperty("orderId") String orderId) {
return MultipartEntityBuilder.create()
.addBinaryBody("entity", invoice.getBytes(),
ContentType.APPLICATION_JSON, orderId)
.build();
}
Cheers,
Dmitry
-----Original Message-----
From: Shultz, Dmitry [mailto:[email protected]]
Sent: Tuesday, September 24, 2019 7:05 PM
To: [email protected]
Subject: Mime Multipart DataFormat+ HTTP4 (POST)
Hi All,
Is there any code sample of how to use the Mime Multipart DataFormat
(https://urldefense.proofpoint.com/v2/url?u=https-3A__camel.apache.org_components_latest_mime-2Dmultipart-2Ddataformat.html&d=DwIFAg&c=KMGz4T0TsfsPtvlb4OD1oA&r=t6OzuNuL86YgAzDSNmWJog3VjIcQB0sodMSERnX0MWo&m=o0gjHjq1dUVfRYnGuSS19BuCudYu0-kygp97FNfBjNc&s=d7bdGL0OQdmvf7TQSpwgzHd38IsLtqQ4DNz3DwsprM8&e=
) for sending some xml payload using HTTP4 component? I need to send it to the
REST service using POST and can't figure it out.
Cheers,
Dmitry