Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Salesforce callout with binary data

Posted on 2014-03-31
2
Medium Priority
?
1,122 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses

715 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