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

learn more… | top users | synonyms

7
votes
1answer
84 views

Access MetadataAPI via JavaScript

We created an 100% native Salesforce IDE as a Managed Package which is using ToolingAPI and MetadataAPI via APEX. This works fine. But there is one thing which really bothers people after the ...
0
votes
0answers
14 views

System.CalloutException: public-proxy20-0-chi.data.sfdc.net

Never seen this error before. It's occurring sporadically when calling an asynchronous call from a Batch. This code has been executing without this issue for years on the same scheduled job. Seems ...
1
vote
2answers
53 views

Unit Testing Callout with Custom Setting

It appears that my Dev org's custom settings are not available within the scope of a unit test so I've written code to insert the needed custom setting within the test. I have a callout method which ...
1
vote
1answer
22 views

Salesforce Callout to ExactTarget via the ExactTarget REST API

Why does the below code always get a "500 internal server error" back from ExactTarget when run anonymously from the Salesforce developer console? (Of course I'm using my own client id and client ...
1
vote
2answers
28 views

Is there a way to get the total callout statistics per day for all the users in a salesforce org?

I am having a need to get and prepare a statistics for the client that would tell them the number of callouts made from each and every user in their org per day basis. I am assuming setting up the ...
1
vote
1answer
19 views

Callout post method : submit value failed!

Have checked the codes many times, looks all ok... However, the remote side responds there's no value transmitted. What's the wrong? String mob = 'MOB'; String msg = 'MSG'; Http h = new Http(); ...
2
votes
0answers
47 views

CalloutException: Read timed out error after increasing timeout

I have simple code to send a get request to our webservice that returns a small json response: System.HttpRequest request = new System.HttpRequest(); request.setMethod('GET'); ...
1
vote
0answers
41 views

Page redirected and displays “URL No Longer Exists” in a webservice callout from Salesforce

There is no issue when the callout to a SAP webservice returns records less than 3k. But if it exceeds i got "URL No Longer Exists" error. Actually this error is not displaying in the current page ...
2
votes
2answers
43 views

Chaining @future methods

Is there any way/workaround at all to call a future method immediately from another future event? If not what's the fastest way to call my future method indirectly? I basically have a 3rd party ...
0
votes
1answer
52 views

Hitting future call limit with Geocoding trigger

This trigger seems to work pretty well for Geocoding accounts... trigger AccountGeocode on Account (after insert, after update) { system.debug('AccountGeocode trigger fired'); ...
0
votes
1answer
24 views

Test class with fields in a web service callout

I've created a trigger with fields that are now in a web service callout. I've created this trigger and deployed in my org before the callout. So now I'm getting an error: "Methods defined as ...
0
votes
0answers
22 views

Http get callout returning improper result [duplicate]

I have a code that initially invokes http GET callout to fetch all the records from external system whenever the VF page loads in salesforce Secondly if any record matches with a record stored in ...
5
votes
1answer
63 views

Callout from a future event

I have a managed app that does a callout (REST API POST) on Account save. The managed app is developed by a 3rd party that we have no control of. The callout creates a future event which gets an id ...
2
votes
1answer
36 views

How to make a callout to a webservice that is connected through a VPN?

I am trying to make a callout to a SAP webservice that is connected through a VPN. It is not accessible and getting IO Exception Unauthorized end point error. System.CalloutException: IO ...
0
votes
1answer
26 views

How can we set query result to http body

public Class GenerateCSV { public GenerateCSV(ApexPages.StandardController controller) { } public List<batch__c> getcontact() { return [select Id,Name,Quote_line_item__c ...
0
votes
1answer
38 views

Send Response back to same url after receiving data from callout

Http http = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint(EndpointUrl); req.setMethod('POST'); req.setBody(xmlstring); req.setHeader('Content-Type', 'application/xml'); ...
1
vote
2answers
47 views

Missing SOAP action header

Im trying to get the session ID of another user in the same org by sending the following request by using the data from my enterprise wsdl and its an developer edition. <?xml version="1.0" ...
4
votes
1answer
111 views

How frequently does Salesforce refresh DNS information?

I have a managed package deployed that is calling web services supplied by another party. On Tuesday last week all calls to this web service started throwing a: System.CalloutException: IO ...
2
votes
2answers
104 views

How to get machine id or physical machine address in Visualforce page or in Apex?

I have been consuming SAP webservices from salesforce using callout mechanism. Currently, i am sending userid in the argument to the webservice to ensure that the call is from a valid salesforce user. ...
1
vote
0answers
25 views

Callout delay when HttpRequest is invoked in a trigger account [duplicate]

I'm doing a http request from salesforce, when I receive the response, I want to update an account field but it is visible until I refresh the page. Everything is in after update. Is there a way to ...
2
votes
1answer
119 views

Third party API has callout time limits: how to catch with error handling, and how to control callout timing?

The third party API I'm working with (Act-On, a marketing software), has a limit of 5 callouts per minute in their sandbox. Unfortunately for me, some of my code requires that I loop through a series ...
2
votes
2answers
546 views

System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out

Im getting CalloutException.You have uncommitted work pending. Here's my VF Page. <apex:commandbutton> SAVE </apex:commandbutton> <apex:pageBLock> <apex:column> ...
0
votes
1answer
506 views

System.JSONException: no content to map to Object due to end of input in test class

I'm working on two apex classes with use the HttpCalloutMock interface and they're working fine when I manually test, but I'm having trouble with the automated test class. Everything seems to look ...
2
votes
1answer
57 views

How to intercept the SOAP Request/Response Made from Salesforce or received in Salesforce?

I am working a salesforce integration project. We are making n number of web service calls to third party services. Now I have to implement a logger , where I need to store the soap request and ...
1
vote
1answer
37 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
601 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
67 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
148 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
209 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
107 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
60 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 ...
1
vote
3answers
184 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 ...
0
votes
2answers
105 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
233 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
85 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
77 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
34 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
67 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: ...
2
votes
1answer
356 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
218 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
224 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
39 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
105 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
75 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
972 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
61 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
325 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
73 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
105 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
1k 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 ...