We are using httpclient & httpmime of version 4.3.6. We are not able to find a way to add Content-Id, encoding fields to mimepart! Below is the code snippet in is:
HttpEntity mimeEntity = MultipartEntityBuilder.create()
.setBoundary("_boundary_")
.addTextBody("xml_body", xmlString, ContentType.TEXT_XML)
.addBinaryBody("pdf_file_name", pdf, ContentType.create(" application/pdf"), pdf.getName())
.build();
The objective is to have the below result in the http post envelope:
Content-ID: <attachment_1>
content-transfer-encoding: base64
Content-Disposition: attachment; filename="attachment.pdf"
content-type: application/pdf
What is the default content-transfer-encoding value to be used for images/pdf/.doc files, which the server should accept by default? We are posting to "https" url of Ariba Network. Is encoding of base64 mandatory for posting to Ariba Network server?
In some places i have seen the encoding was 7bit/8bit, which is not supported in this api (dont know the reason & background). The tutorial did not provide an example on this. Great, if you can provide a code snippet that can be of help or a link!!!
Thanks