cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1IF rest service, upload file

former_member259550
Discoverer

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>
<destHost>posttestserver.com</destHost>
<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

Accepted Solutions (0)

Answers (0)