Specifying response format to Binary or OctetStream in Apigee Service callout

Hi All, I am calling Soap API in Apigee service callout which returns xml with attachments. In Apigee is their a way to specify how to read the response as binary or octet stream. Because Apigee by default is converting the response to UTF-8. Because of this when I convert the attachment to base64 string and generate the PDF out of the base64 string it returns the blank pdf.

Basically, I want to address the issue which is similar to in this link https://www.linkedin.com/pulse/converting-pdf-binary-base64-nodejs-trick-end-andrew-ribeiro

0 1 194
1 REPLY 1

I am calling Soap API in Apigee service callout which returns xml with attachments.

Can you show an example of the actual message that comes back from the upstream service?

And also clarify just what you want Apigee to do with that response.

The nodejs article seems not quite relevant to solving a problem within Apigee.

There have been a few questions related to MTOM on the Apigee community over the past couple years. Have you searched here?

While some of those Q&A entries may refer to attachments that are not PDF -  ZIPs or PNG or whatever - the idea is the same.  A similar solution will apply.