Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Java Mapping for HTTP Post


Im following this blog but I have encountered an issue which I cannot solve.

My issue is, in addition to the required output, I am also getting unwanted XML added, which originates from the Message Type in the source Service Interface,


Content-Type: multipart/form-data; boundary=--ejjeeffe1

Content-Disposition: form-data; name="event"
Content-Type: text/plain

Import File
Content-Disposition: form-data; name="Filename"
Content-Type: text/plain
Content-Disposition: form-data; name="content";filename=""
Content-Type: application/zip
Content-Transfer-Encoding: binary

<?xml version="1.0" encoding="UTF-8"?><__EmptyDoc></__EmptyDoc>

Any suggestions much appreciated.



Former Member replied

Hi Stephen

The xml must be getting added in the below part of the code. It is coming from arg[0]

You can put a check and get it removed.

while ((len = != -1) {

  arg1.write(buffer, 0, len);




0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question