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

learn more… | top users | synonyms

0
votes
0answers
13 views

Unknown Property Error

I have written a webservice to be called from salesforce. I generated a class from wsdl: //Generated by wsdl2apex public class SFtoACSApex { public class ArrayOfAccountInfo { ...
0
votes
0answers
15 views

Uploading files to Onedrive using POST - some of the file types get corrupted

I am using POST method for uploading files to Onedrive but certain file types get corrupted. I've already taken the code from the below posting but still i am getting file corruption issue ...
3
votes
1answer
82 views

HTTP Callout Error

I have the below code trying to make a HTTP callout from a APEX class. The response I get back is System.HttpResponse[Status=Moved Temporarily, StatusCode=302] However if I use the same URL to make ...
2
votes
0answers
21 views

Async Callout Test Failing in Production

Situation I have implemented an API to communicate with the external system. After 18th of August test that i have on production have started failing showing the infamous: ...
2
votes
2answers
52 views

Test Unit: inserting test records before method with a callout?

I have a batch apex class that makes a callout at the beginning of each batch. I'm pretty certain that the callout error I'm getting isn't related to the order of DML statements and callouts within ...
1
vote
0answers
48 views

Http callout not giving correct response when calling fom visualforce page

I am stuck in to one strange problem. I am sending http request as below. The below request giving me perfect result when i m calling it from developer console, but for some reasons it is not working ...
4
votes
2answers
117 views

Concurrent HTTP callouts vs single callout

Background I have 3 identical HTTP servers, holding the same data: api1, api2 and api3. I want to query this data as reliable and quick as possible. In Java, I would have done this by spawning 3 ...
2
votes
1answer
43 views

Async Apex & Fault Tolerance

Trying to see if I can make Async Apex jobs fault tolerant; meaning if they fail can I implement some sort of retry logic? What would this retry mechanism look like and is there any documentation or ...
1
vote
0answers
36 views

Outbound Messages, Apex Callouts or Polling

We need certain events in SalesForce to trigger our web service endpoints being hit (to kick off internal processes). As I understand it, there are 3 options here: Outbound Messages Apex Callouts ...
3
votes
0answers
122 views

Unit Test: You have uncommitted work pending. Please commit or rollback before calling out

So I have a method that takes as a parameter an Id of a object and uses it to make an external callout. Unfortunately I can't seem to figure out any way to test it. @isTest static void ...
0
votes
1answer
31 views

Bulkifying Code For a Callout

I have a trigger on EmailMessage. I have to get the subject of the case created from the email message. From the subject I am calling an APi to get the language and then updating it to the case ...
0
votes
0answers
20 views

Callout Limits within Batch Apex [duplicate]

How to use the batch to send more than 10 emails using callout. I've done a class batch that contains a start that has the query, an execute that has the sendEmail and a finish that has nothing but ...
3
votes
2answers
59 views

How do you use Batch for send more than 10 emails?

I have been watching how to implement the batch for sending more than 10 email but I get errors. When I send emails I have a limit 5 and also are sent several times to the same user email global ...
4
votes
2answers
79 views

Batch Apex: Can I run code prior to running 'Execute' code on batches, and will it affect governors limits?

Below is my question in a nutshell, using the framework for a batch apex class: global class ActOn_Batchable implements Database.Batchable<sObject>{ string query = 'query here'; **CAN ...
7
votes
1answer
162 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
18 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
80 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
72 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
33 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
29 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
192 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
109 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 ...
3
votes
4answers
94 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
73 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
60 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
79 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
77 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
33 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
53 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'); ...
2
votes
3answers
115 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
150 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
134 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
26 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
188 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 ...
3
votes
2answers
1k 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
1k 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
109 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
42 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
833 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
94 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
195 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
253 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
178 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
74 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 ...
2
votes
3answers
325 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
146 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
347 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
102 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
95 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 , ...