Convert Soap web service to Rest API that upload/download file in multi part MTOM format.

Hi,

I am working on hosting a soap service as REST API on Apigee. The service allows user to upload/down load file in MTOM format that has two parts. First part is soap envelope with URL to document cache. Second part has the actual binary of the file. How can I convert it to REST API to allow simple upload/download in multi-part/form-data format?

Following is MTOM content received from download file soap service:

--uuid:62011823-7e50-4aeb-8f0a-9391ce99c77d+id=2

Content-ID: <http://tempuri.org/0>

Content-Transfer-Encoding: 8bit Content-Type: application/xop+xml;charset=utf-8;type="text/xml"

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:FileMetadata s:mustUnderstand="1" xmlns:h="http://tempuri.org/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><CreatedBy i:nil="true" /></h:FileMetadata></s:Header><s:Body><FileByteStream xmlns="http://tempuri.org/"><xop:Include href="cid:http://tempuri.org/1/636306217891804043" xmlns:xop="http://www.w3.org/2004/08/xop/include"/></FileByteStream></s:Body></s:Envelope>

--uuid:62011823-7e50-4aeb-8f0a-9391ce99c77d+id=2

Content-ID: <http://tempuri.org/1/636306217891804043>

Content-Transfer-Encoding: binary

Content-Type: application/octet-stream

PK



!ߤ�lZ

--uuid:62011823-7e50-4aeb-8f0a-9391ce99c77d+id=2--

Any help would be appreciated.

Thanks,

Surabhi

0 2 1,049
2 REPLIES 2

sjm2000
Participant V

Are you in cloud or premise ?

What is the max size of file . Less than 5 Mb / 10 mb ?

(Interesting scenario though.)

out environment is on cloud. files would not be very big.