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

learn more… | top users | synonyms

2
votes
1answer
22 views

Running Metadata API in Apex as a specific user

Calling the metadata API in Apex requires admin permission (or at least the "Modify All Data" access). To run the code as a non-admin user I am thinking I need to first login as the sys admin, get a ...
0
votes
0answers
17 views

Unsure of Testing HTTPCallOut

I need to deploy a class I wrote which is essentially for an HTTPCall Out. I've looked at this link but am still not sure where to start. I am a beginner to all of this. A trigger calls this class. ...
0
votes
0answers
16 views

Apex Batch Jobs with callouts running during maintenance

I've got an apex job that had started running before the maintenance and then about an hour into it, it appears there was some Salesforce maintenance or downtime. This appears to have suspended the ...
1
vote
0answers
34 views

How to call external saml protected web service from salesforce?

I want to call an secured external web service from salesforce. I dont want to pass user name and password as part of my webservice call out since I dont want to maintain them in salesforce. This is ...
2
votes
2answers
34 views

How to manage the cumulative time callout limit?

i searched aroud a solution, but I didn't found someone that already made the question. I'm searching an approach to calculate the value of the cumulative time spent in callouts... I checked the apex ...
5
votes
1answer
87 views

Calling a Callout via @future still gives uncommitted work pending error

Class A is simple page controller. It creates an instance of Class B. The user can click a button on a VF page to invoke a pagereference method in Class A that will invoke various methods in class B, ...
2
votes
1answer
61 views

What version soap does Salesforce use?

I'm having the worst time ever trying to find out what SOAP Salesforce uses. I haven't used it in forever the developer from our other system is asking me if it uses SOAP 1.1 or 1.2. NOTE-I will ...
0
votes
1answer
58 views

How to handle SOAP Response?

What is the common practice in handling the response of a callout? the response I get is a String datatype but it's value has xml elements within in them. I was thinking of manipulating the contents ...
0
votes
1answer
24 views

When exactly would a Calloutexception occurs in Salesforce?

I am trying to send a XML from Salesforce to an external system and callout exception occurs time and again . It is occurring sometime but working fine most of the times . What are the cases when a ...
0
votes
1answer
54 views

Does HttpCalloutMock work when the tested method doesn't return HttpResponse?

UPDATED: I've included the unit test. I'm trying to test a Visualforce extension method that does a callout but returns a PageReference, not an HttpResponse. I'm finding that the HttpCalloutMock ...
1
vote
2answers
33 views

Callouts, timeouts, and execution/response

I have a general question about the nature of callouts and timeouts in Apex. This is probably something I should know already, but I don't. From testing, if I set the callout timeout limit on a REST ...
4
votes
2answers
118 views

How to create HttpRequest body as plain string from WSDL?

Is there an good way to (automatically) create proper request bodies from WSDL files just as a plain xml string? I need this for perfoming calls from APEX to different salesforce APIs, mostly for the ...
2
votes
1answer
49 views

Best Way to Schedule Update of ~100k records

I have a custom object that I use to list all of the unique websites related to Accounts. There are about 100,000 records in this table. I'd like to schedule something like an Apex callout to update ...
2
votes
1answer
47 views

Renaming standard buttons in related list

I have created a custom object called Call__c. In my related list, the button on the related list says New Call. Is it possible to rename this to Link Call instead?
1
vote
1answer
35 views

Detecting and retrying CalloutException in Batchable iterable

I have a nightly batchable job in my SFDC org that queries a remote SFDC org for account and opportunities meeting certain criteria. Works great but every so often, I get System.calloutException read ...
1
vote
1answer
50 views

How to test callout in batch

I'm trying test a critical part of an application that is in a batch process and makes callouts to a server. MyObject__c obj = new MyObject__c(name='test'); insert obj; Test.startTest(); ...
0
votes
0answers
47 views

“Peer not Authenticated” Error?

I have created a custom Rest Service in SFDC . There is a external java program who is calling this service getting the error "Peer not Authenthicated". However, it work fine when make a call to ...
9
votes
1answer
90 views

How can I make a PATCH HTTP Callout from Apex?

I need to make a PATCH http request. I made the rather incredible discovery today that I can't set an HttpRequest to use the PATCH method, as when sending the request I get a callout exception: ...
0
votes
1answer
69 views

SOAP callout error: Failed to deserialize value

I am testing an integration between Salesforce and another system via Web Service Collouts. For that, I am using WSDL->APEX generated class. When invoke the web service via anonymous apex, I get a ...
1
vote
0answers
52 views

Is it possible to use the setHeader method on HttpRequest Class to set the referer?

Using an Apex callout to Google Maps geocoding API, I want to authorize narrowly within Google to protect the client ID from being reused by anyone else. I believe the referer header needs to match ...
8
votes
1answer
336 views

What would be the proactive steps that we need to take when salesforce disables SSL and enables TLS?

I heard that salesforce would stop the support for SSL 3.0 and will enforce TLS 1.0 and higher. https://help.salesforce.com/apex/HTViewSolution?urlname=Salesforce-disabling-SSL-3-0-encryption From ...
0
votes
0answers
69 views

Design Approach: Apex Callout limits

I am developing an appexchange managed application intended for multiple subscribing organizations and as a part of requirement my managed application needs to make an extensive API callout to an ...
4
votes
2answers
331 views

Rest HttpRequest to outside system

I'm having issues correctly getting Salesforce to connect to one of our external systems. They recently whitelisted the range of Salesforce addresses (At least so they said). Our Sandbox is coming ...
2
votes
1answer
93 views

Tackle Callout Limit Salesforce

I am creating an managed application for salesforce appexchange listing. App Functionality: On certain update events a trigger will send a few non-critical information to a external server ...
2
votes
1answer
67 views

How to make 100% sure your certificate is compatible with Salesforce

We recently had a certificate signed by DigiCert to used in a 2-way SSL integration with a partner. While it's root certificate is trusted by SF, the intermediate is not (see previous post) Despite ...
4
votes
2answers
123 views

Salesforce intermediate certificate chain

I'm working on a project that is integrating Salesforce with a 3rd party API. They require us to pass a client certificate. Our admin created a CSR in Salesforce and got it signed by DigiCert. ...
4
votes
0answers
28 views

Received fatal alert: bad_record_mac [duplicate]

When performing callouts from Salesforce to various remote endpoints, we'll occassionally/intermittently receive a "bad_record_mac" error. Sometimes they are persistent and don't go away after a ...
0
votes
1answer
55 views

How to manually give a callout in test class

I needed to throw a callout exception by hardcoding it in test class for batch class.Is there any method to do that ? try{ XXXX } catch (CalloutException excpObj) { ...
1
vote
1answer
147 views

How to run Burp web scanner for HTTP Callout?

I have submitted app for security review and they asked for Burp Scan Report. I have followed video tutorial but not get succeeded. Burp Scanner scan salesforce site instead of my HTTP Callout. ...
1
vote
1answer
88 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
56 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
228 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 ...
4
votes
0answers
50 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
206 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
196 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
177 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
99 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
113 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
646 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
47 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
22 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
318 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
143 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 ...
8
votes
1answer
405 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
21 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
141 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 ...
2
votes
1answer
174 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
46 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
46 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(); ...
3
votes
0answers
1k 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'); ...