cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping for HTTP Post

former_member105769
Participant
0 Kudos


Hi

Im following this blog http://scn.sap.com/community/pi-and-soa-middleware/blog/2014/09/12/html-form-upload-using-http-plain... 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,

i.e.

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

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

Import File
--ejjeeffe1
Content-Disposition: form-data; name="Filename"
Content-Type: text/plain

TestFile.zip
--ejjeeffe1
Content-Disposition: form-data; name="content";filename="TestFile.zip"
Content-Type: application/zip
Content-Transfer-Encoding: binary

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

Any suggestions much appreciated.

Regards

Steve

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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 = arg0.read(buffer)) != -1) {

  arg1.write(buffer, 0, len);

  }

Regards

Osman

Answers (0)