What are the best ways to send multiple attachments through SOAP based requests?

Hi community,

 

We've this situation where we need to send all the attachments that are linked to Documents, including the byte[] data, to a SOAP based service.

We have two solutions in order to implement this:

  1. To send the attachments we could simply convert the byte[] data to base64 string and send it within the body of the SOAP message. Some of the files are more than 10MB, so this is not the best solution.
  2. The other solution is to use the MTOM message encoder, to send the attachments in multiple parts.

We have two questions:

  1. What are the best ways to send multiple attachments through SOAP based requests?
  2. If we choose to send the attachments using MTOM, how can we implement this?

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

 

 

Like 2

Like

1 comments

Hi Pedro,

 

Maybe it's better to call the https://<instance>/0/rest/FileService/GetFile/7B332DB9-3993-4136-AC32-09353333CC7A/fileId for all the files and receive a response from the third party service? You need to call this link for each record from the DocumentFile table (filed should be modified for each time with an actual Id of a record from the DocumentFile table). Previously we didn't have such requests and we have no practical example of the logic deployment. The link above is a base link used to download attachments when clicking them on the "Attachments" detail so you can try calling it in the webservice.

 

Best regards,

Oscar

Show all comments