Skip to Content
0

SAP B1IF rest service, upload file

May 04, 2017 at 07:12 AM

81

avatar image

Hello

I want to use HTTP call to upload file to service. I got this file by call to service i provide by B1IF. How to shape http message to upload this file?

Every way I tried server don't get file.

One of way i tried:

<call>

<connect>
<destProtocol>http</destProtocol>
posttestserver.com
<destPort>80</destPort>
<destPath>post.php</destPath>
<method>post</method>
<query>fileName=testFile</query>
</connect>

<pltype>bmp</pltype>
<payload operation="">
<bfa:io xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="mup" encoding="ISO-8859-1">
<bfa:fileupload fieldname="file" filename="testFile.bmp" clientfile="testFile.bmp" contenttype="application/octet-stream" pltype="bmp">
<bfa:io pltype="bmp">
Qk02AwAAAAAAADYAAAAoAAAAEAAAABAAAAGBCtGBCtBCtGm2KCm2KCm2KCm2KCm2KCm2KCm2UVHE
</bfa:io>
</bfa:fileupload>
</bfa:io>
</payload>
<htta>
<par id="httpheader.Content-Type" value="multipart/form-data"></par>

<par id="httpheader.Accept" value="application/json"></par>
</htta>
</call>

Best regards,

Bartek

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers