How can we send attachments through "WebService Integration Setup" tool?

Hi Community,

 

We have this situation where we need to send a specific attachment to our client's API. This API only accepts "multipart/form-data" contents, so we need to send the byte[] of our attachment.

 

Is it possible to send the byte[] from our attachments to the API using the "Web Service Integration Setup" tool? If yes, how can we achieve that?

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

Like 1

Like

1 comments

Hi Pedro,

 

You need to use a stream to pass a byte array in a body of a request. It's possible to create a business process that uses WebService call process element and you can also use a script-task element. Here we can find examples of locating an attachment in the system and reading it in a stream. Once it's read completely you can pass the read byte[] to the request body and perform an API call to the endpoint where the file should be passed. Feel free to develop your logic using the article provided.

 

Best regards,

Oscar

Show all comments