"HTTP Callouts" connect to a remote web server from Apex code.

learn more… | top users | synonyms

1
vote
1answer
23 views

Long running, but finite length Apex Callout generates timeout exception: Workarounds?

I am trying to work with a 3rd party service api . One of the methods they have brings in all records which takes a lot of time , about 9 mins ( i tried this using chrome app "Advanced Rest Client"). ...
4
votes
2answers
152 views

JSON Exception unexpected character

I am doing a callout to a google script which takes in address and returns back geographic information (lat, lng etc) in the form of JSON string. The problem is that in the returned JSON string " is ...
3
votes
1answer
28 views

Sending HTTP callout after a Lead record is updated

I have a requirement where I have to send Lead data from Salesforce to TIBCO server once Send_to_CRM__c check box goes from false to true on Lead update. Once updated 2 web-services are suppose to go ...
2
votes
1answer
80 views

Too many callouts 11 while testing using webservicemock interface

i have written a test class for a controller in which one of the method makes a callout. This is one single invocation of external SAP webservice. But my debug log shows more than 10 invocation of the ...
6
votes
1answer
125 views

HTTP Callout Problems in Pre-release

I am running the same code in two different environments and I am getting different results. I have the following code hitting the REST API exposed on StackExchange: Http httpQuestions = new Http(); ...
1
vote
1answer
35 views

Future Callout Unit Tests!

I am testing a SOAP callout. The callout happens on a after insert and after update. The issue that I am facing is that, when I insert or update a record in the unit tests, I can trace that it reaches ...
0
votes
1answer
38 views

What are the main differences between Http Callout and Webservice Callout in Salesforce?

I am quite a bit confused to understand the difference between http callout and webservice callout. though it is a simple question i just want to know most important differences. Can anyone please ...
0
votes
3answers
37 views

Too many callouts: 1 in Salesforce Batch

When i am sending one HTTPRequest it's giving error : System.LimitException: Too many callouts: 1 Don't understand why...pls help me out. Thanks! Here is my code: global class ClassName ...
-1
votes
1answer
51 views

Problem to run Amazon web service S3 integration code supported by Salesforce

I am using Salesforce supported sample code to integrate application with S3. I followed this Link to install package http://wiki.developerforce.com/page/Installing_Force_for_Amazon_Web_Services ...
0
votes
3answers
45 views

comparing fields and relationship fields via before and after update

I am making a callout on Insert, Update or Delete of a record. This question pertains to the update of the record, in order to make the process more efficient from Salesforce below is what I am trying ...
-1
votes
3answers
42 views

Future Callouts on Deletion of records!

I am facing a very simple problem. I want to make a callout on the deletion of records, and push a bunch of to an external service. The problem is described below: Trigger Logic: Map <ID, ...
1
vote
1answer
33 views

Add wild card in Remote Site Settings for Managed Packages

Is it possible to add Wild cards in the remote site settings for HTTP Callouts. For example I have a web service called foo.com. My customers have accounts on my service as customer1.foo.com , ...
0
votes
0answers
23 views

Can we post into multiple linkedin groups at one instance using group API of linkedin

I am trying to post into multiple groups of linkedin using linkedinAPI http://api.linkedin.com/v1/groups/{group-id}/posts This works fine with a single group. I cant find any documentation on ...
1
vote
0answers
37 views

Error in post-install HTTP request

I'm developing a package with a post-install script. The script makes a HTTP request to my webserver, or sends me an email if an error occured. Every time the script is run, I receive this error: ...
0
votes
0answers
113 views

Web service callout failed using enterprise wsdl

I am using enterprise wsdl to login and get session id. as I have verified in login history, Its logged in successfully. But it throws the error when it invokes the another sfdc webservice from future ...
0
votes
1answer
92 views

Callout Error: Invalid session ID

I am using schedulable class which will invoke apex call out. This is the salesforce web service from same org. I am getting the following error: System.CalloutException: Web service callout failed: ...
2
votes
2answers
72 views

How to overcome Maximum size of callout request or response in an external callout

Hi All I have a requirement were external webservice should handle more than 3MB of data. I am trying to send document/files to external system using callout. Is there any alternative way such as ...
1
vote
0answers
29 views

Spring 14 Login issue using partner wsdl

I have approval process where users will approve records only through email. Once Users approved automatically pdf will be generated. Since there is a restriction in create pdf from Trigger or future ...
2
votes
1answer
73 views

Salesforce UnitTest exception message: “You cannot make callout after creating a Savepoint” test error

I have noticed very strange behavior while executing test. In one method on the class i test Savepoint is created. This method is used also in test for creation of records. After that there is a ...
4
votes
1answer
45 views

Is there a way to load an internal Salesforce page from a scheduled batch?

My end goal is to be able to send license usage as well as data/file storage usage from clients to our org. As these values don't appear to be available directly via any API calls, I had to resort to ...
0
votes
0answers
441 views

Apex Callout Exception: IO Exception: Read timed out

I have Salesforce trigger that triggers either a future method or batch job that does call outs to a SOAP webservice. IF the number of call outs I need to make is one then future method is triggered. ...
3
votes
1answer
48 views

Getting “TestMethod does not support Web service callouts”, callout is in managed trigger

I'm getting an error when trying to test a Lead conversion trigger that the TestMethod doesn't support Web service callouts. (As an aside: it's Scott Hemeter's code for setting Primary and a Role on ...
1
vote
2answers
107 views

while calling Apex REST class, getting response “Could not find a match for URL /CallREST1”,“errorCode”:“NOT_FOUND”}]"

here is my APEX REST class code @RestResource(urlMapping='/CallREST1') global with sharing class CallREST { @HttpPost global static String createNewCase(String companyName) { ...
4
votes
1answer
55 views

Unit testing with callout conflicts with workflow rule

I am having a problem that I investigated down to this very simple minimalistic example that can be reproduced easily. 1) Create a workflow rule on the Account object that will send an email to the ...
2
votes
1answer
69 views

Log Callout Exception - Uncommitted work pending workaround

I want to perform 5 callouts and log any callout exceptions as a new case. Since mixing callouts and DMLs is not allowed, I made the logging asynchronous. Unfortunately, an ExecutionException ...
4
votes
3answers
515 views

Post multipart without Base64 Encoding the body

I am trying to POST a PDF attachment to a Restful web service (not under my control). My issue is that I need to get put the raw bytes of the PDF into the Body of the request and whenever I call ...
3
votes
2answers
115 views

How to create share url in Box.com Rest Api from Apex

I want to create share url of a file which is in Box.com using REST API from Apex. I have written following code public static Map<Integer, boxShareUrlJson> getShareUrl(String ...
1
vote
2answers
100 views

Callouts Limits Anyone?

I have a Visualforce form that saves a custom object and send some fields to a REST web service in a controller method. I am using the good old httprequest to accomplish that and it works fine. This ...
2
votes
1answer
707 views

Salesforce Callout Exception

I created a Salesforce client using "Generate class from WSDL" feature. When i try to call the web service, throws the following error: "System.CalloutException: Web service callout failed: ...
5
votes
2answers
113 views

HttpCallout resulting Html response instead of JSON

I am trying to make a httpcallout to "https://www.carrierlookup.com". When I tried it with browser's apex rest client extension it returned correct response : ...
3
votes
2answers
288 views

Http callout from Apex

I want to send a http callout to a external system we are intergrating with. How do I go about setting up this class so that when a user updates any record, this message is sent out to the external ...
2
votes
1answer
304 views

How to perform Callout and DML operation simultaneously?

I'm facing a issue while doing a callout. I have tried from my side, but unable to wave it out. 1) Create a custom setting with name – FolderDetails . //Done 2) Have the custom settings store ...
7
votes
2answers
360 views

Salesforce call Heroku Web Service

We have a salesforce application, and the application triggers a callout to a heroku service that gathers some data from a third party database. After gathering and processing the data from the third ...
10
votes
3answers
318 views

Unit tests that need more than one WebServiceMock

I'm dealing with an odd situation where I need to call Webservice A to authenticate to Webservice B and Webservice C, all with different endpoints. I know how to setup mocks to test B and C ...
4
votes
2answers
316 views

Making a Http GET callout to internal Salesforce URL

I have a Salesforce VisualForce page that pretty much just Outputs XML: https://[mynameserver]/Apex/[myxmlpage] I want to expose a WSDL service where I am pretty much just going to wrap the ...
11
votes
3answers
716 views

Challenge with unit tests, mock callouts and running as a user

Background I am developing a number of business applications within a community. Many of these apps rely on callouts to another ERP system to verify or retrieve or push data. In order to adequately ...
8
votes
2answers
314 views

Is there a simple way to serialize execution of Batchable class?

I need to Geocode addresses on Account using an HTTP callout; the webservice will only service one address per callout. For this use case it is preferable to geocode the accounts immediately, rather ...
10
votes
1answer
269 views

BURP Scanning a managed package

Salesforce have asked me to do a BURP Scan on my managed package before I submit it to the AppExchange. My Managed Package is built on the Force.com platform. It does perform a couple of callouts to ...
7
votes
1answer
108 views

Managed package callout invoked from managed package extension causing test class failure

We have a managed package that has executes a HTTP callout from a trigger that calls a future method on the insertion of new records on a particular object. We have a managed package extension that ...
6
votes
3answers
700 views

Error when doing a test callout to a REST web service

I'm trying to test a http callout from the developer console but I'm getting a 502 Bad Gateway error when I try to do a POST. Only working with the sample callout code mentioned here: ...
2
votes
1answer
121 views

how to call a web service callout from a method in a utility class

DO anyone have the idea of how to call a web service callout from a method in a utility class . i mean web service response elements . I have response class for a web service ....... but i dont want ...
3
votes
3answers
348 views

How to troubleshoot Apex callout errors?

We have some Visualforce controllers that make SOAP calls to a hosted VM. Intermittently these callouts fail and we are having trouble finding the failure. When the failures do happen we can re-point ...
1
vote
1answer
454 views

Integrating a real-time notification application with Salesforce

I want to create an application in NodeJs, using either Faye or Socket.IO, or in Redis, that receives updates when certain fields or objects are changed in Salesforce. As far as I know, it's possible ...
7
votes
1answer
315 views

Callouts to Retrieve Attachments

We are working on exposing some internal services to Salesforce. One of the things we would like to do is retrieve PDFs from a SOAP web service. I'm trying to figure out what format Salesforce can ...
3
votes
2answers
344 views

Is there a way to print the rax soap request and response during a call out in apex

We have several call outs from salesforce to an external webservices where we consume the external application wsdl and make call outs from our visual force pages. Do you guys know how can i print ...
3
votes
1answer
157 views

Best Practices: Callout retry

I'm trying to implement an auto-retry method on callout fail. I notice that is better to wait some prudential time to make the retry call, to avoid flooding issues on remote server. By now, I'm ...
0
votes
2answers
97 views

Random Callout Timeouts suddenly since today

I do Callouts within the same org. Suddenly this morning i got timeout errors at like every second try. That never happend before, why today and that much? Why is there a random response, that makes ...
2
votes
2answers
678 views

How to access a VF page as PDF within trigger/scheduled APEX

I have run into yet another problem due to restrictions placed by Salesforce. So apparently we cannot make a call to a Visualforce page using getContent() from within a Apex trigger. Currently we ...
2
votes
1answer
140 views

How to get google adwords reports in salesforce?

Hi I am developing application in salesforce for accessing the google adwords reports data for e.g. ADGROUP_PERFORMANCE_REPORT. I am sending http post request to ...
4
votes
2answers
263 views

Getting CalloutException when testing Batchable class with Callouts and HttpCalloutMock

I'm trying to write test code for a Batchable class that AllowsCallouts. I've written a lot of other test code that uses HttpCalloutMock classes, and planned to do so for this class as well. And, ...