Solved

Salesforce callout with binary data

Posted on 2014-03-31
2
1,036 Views
Last Modified: 2016-02-16
I need to send data to a web service from Salesforce using an APEX REST call out method.

Sending basic text data is no problem.
But apparently there is no way to send a blob or binary data.
Therefore there is no easy way to attach a file to the web service call out.

My question is, can I somehow encode/re-encode the binary attachment into plain text that can then be de-coded on the other end?

Thanks,

Kevin.
0
Comment
Question by:kevinvw1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 43

Accepted Solution

by:
Rob earned 500 total points
ID: 39968834
the wiki on APEX REST https://wiki.developerforce.com/page/Creating_REST_APIs_using_Apex_REST.

Scroll down to "Accepting Binary Data from RESTRequest Object" for an example.

I was about to say just base64 encode your binary data and send as an image before coming across this, which says that's not required.
0
 

Author Comment

by:kevinvw1
ID: 39970119
Hi, thanks for the info.

Unless I am mis-understanding something it sounds like the example is to push an attachment IN to SFDC.

I am trying to push an attachment OUT of SFDC using a call out.
But apparently the call outs do not support binary type.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question