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

learn more… | top users | synonyms

0
votes
1answer
29 views

Apex Callouts retrieve audio content

I am making a callout to a 3rd party to retrieve an mp3 file The endpoint is a HTTP GET (https://api.ubity.com/recording?key=HV5nPTLk98UPeTLxqwA8&callid=ABC12345) The response is the actual MP3 ...
-1
votes
1answer
25 views

Methods defined as TestMethod do not support Web service callouts, test skipped [duplicate]

Getting the error after running the test, and the code coverage for the class is 73%. I would appreciate if you could point me in the right direction. Class and the test class is below for your ...
1
vote
1answer
48 views

Accessing Named Credentials' data in apex

Is there a way of accessing the data (exact fields) stored in Spring 15' Named Credentials from apex? For example the username, password and endpoint link fields? And I don't mean for the callout, but ...
0
votes
1answer
26 views

APEX callout: job says complete however no update on our server with no debug log

I was testing out a new APEX callout where whenever an opportunity was won, it would call out to our application. I was able to get the job to complete, however I am not seeing the update take ...
0
votes
1answer
26 views

Number of callouts apex resource warning

I have a scenario where i need to call a Remote Action which makes a callout in a loop until i get some results from the external service. Reason to call it in a loop is that if for some input service ...
1
vote
1answer
27 views

update records through a @future callout method inside a before/after update trigger fires

I have a trigger that fires when the address has changed on a record. I make a callout to Google API to gain the longitude and latitude information that I then want to put inside of my record. When ...
1
vote
1answer
53 views

Sending a rest callout using JSONGenerator?

I am triying to send a callout using JSONGenerator in salesforce but I am having difficuty in putting the things through using .write methods. Any help will be great. { "request" : { ...
1
vote
1answer
25 views

Messaging.sendEmail - You have uncommitted work pending. Please commit or rollback before calling out

I have a callout class to make a call to a web service, I would like to send an email when the callout fails: String ret=''; try { ret = ApprovalService.CreateApprovalRequest(sessionId, ...
-1
votes
1answer
24 views

How to resolve HTTP Version Not Supported or StatusCode=505 error?

18:05:15.047 (47002596)|CALLOUT_REQUEST| [217]|System.HttpRequest[Endpoint=https://rest1.bullhornstaffing.com/rest- services/32qip/search/Candidate?BhRestToken=5a9c3e65-bad6-45c7-91d3- ...
1
vote
0answers
24 views

Well formed Http Request

I'm trying to make a callout to AWS S3 Put Object - Copy from APEX code, the request must be something like: PUT /destinationObject HTTP/1.1 Host: destinationBucket.s3.amazonaws.com ...
0
votes
0answers
32 views

How can I navigate to a specific URL from inside an Apex Class (Controller Extension)

I have an Visual Force page which when visited launches an Apex Callout, when this callout is done (Contact object has been created/updated) the original VisualForce page needs to update to reflect ...
1
vote
1answer
78 views

Update VisualForce Page field after Apex future callout

Want to update a VisualForce Page once my @future Apex Callout is done. How can I update a VisualForcePage, once the Webservice callout is done? Could I somehow divide the SearchCRM method, so that it ...
1
vote
2answers
40 views

During deployment, Test Class for trigger of @future method with callout returning “Uncommited work pending error”

So I'm familiar with the error System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out but I'm stumped with this one! I have a call with a ...
1
vote
1answer
39 views

What should be a good aproach to retry a web service callout?

Today i recived an exception mail saying this : Exception Message: Upsert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: [] ...
2
votes
4answers
112 views

How to insert a record and then do callout? [duplicate]

I have a visualforce page where i get a serial number and making callout to get the related information from external system on click of a button. Before making the callout i need to insert a record ...
0
votes
1answer
31 views

callout error with out callouts in my class

Hi I have below class and test class. I am getting the "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out" error. can u please help me out. ...
3
votes
2answers
48 views

send a Report as a CSV/TEXT through HttpRequest

i am new to salesforce programming , and i am trying to send a file through HttpRequest to a 3rd party . the file i am trying to send is a report converted to csv format or text !! is there a way to ...
2
votes
2answers
44 views

Use System.runAs() in a Test Method for calling web service

Everytime I solve a problem, another appears. More than a problem, I would say a SalesForce restrictions. So, I want to test some code (which makes a web service call in order to display some data) ...
3
votes
1answer
51 views

Callout to web service doesn't work depending the profile I'm using

I have a customized button that once you click it, a new window it's open displaying some data from an external app, getting the data through a SOAP web service. If I'm logged as System Administrator ...
0
votes
0answers
14 views

OpenAir Link Update

I'm working to update a button on the Salesforce Opportunity that calls out to an instance of OpenAir and creates a new Project. I'm wondering if it's possible to pass the ID of a Contact within ...
1
vote
1answer
56 views

How to use what3words API in Salesforce to convert w3w address to coordinates

I am using what3words (http://what3words.com) to save locations in Salesforce, by simply copying the w3w address from their app and pasting it into Salesforce using the mobile app. I want to then ...
1
vote
1answer
94 views

Waiting for Response. Google Time Zone and GeoCode API

I am trying to make a TimeZone class that does the process to get a time zone. I am using the Google API's. In order to get the timezone you have to make a callout to the Google Geocode API and get ...
2
votes
1answer
86 views

IO Exception: Received fatal alert: handshake_failure

Its a callout ,Whenever I try to connect with Secured Gateway, it fails I have given then client certificate of salesforce env. Do you think Iam missing anything here .Please help
0
votes
0answers
17 views

LoadState() Method.

I have a question in regards to a LoadState() method I found. I have been trying to find some information after seeing this method on an Apex @future(Callout=true)class. I know this method exist in ...
2
votes
1answer
40 views

Dynamic endpoints in salesforce callout

Endpoints are always hard coded in remote settings and in the code, Is there a way that endpoints which I am hard coding can be dynamic . So that If Target System url changes , I need not to make ...
6
votes
1answer
92 views

Considerations for calling out to enterprise applications behind a firewall from salesforce?

If I'm looking to integrate an enterprise application behind a firewall with Salesforce, what considerations should I be making? From the architect certification study guide Given a scenario, ...
2
votes
1answer
50 views

Delete a ressource from cloudinary

I'm using cloudinary to store images. when I try to delete a resource, I get the following error message: HTTP method DELETE doesn't support output. my source code: Http h = new Http(); ...
0
votes
1answer
61 views

Clicking button it should reload the page, the callout must be perform asynchronous

My question is that clicking button it should reload the page, The callout must be perform asynchronous. Now its works like a reloading the page after finishing the callout. Custom Button : Execute ...
1
vote
0answers
54 views

Test Method for callout in Future method

I have a trigger on Account. On Account insert, I am sending a callout through future method. I am trying to write a test class for this but I am getting either of these two errors - 1) You have ...
2
votes
1answer
53 views

Unable to make web callout even after Database.rollback

Savepoint sp = Database.setSavepoint(); insert new Campaign(Name='test'); Database.rollback(sp); HttpRequest req = new HttpRequest(); req.setEndpoint('http://google.com'); req.setMethod('GET'); Http ...
0
votes
0answers
147 views

Http Request callout - Handshake failure (probably certificate error)

I have a server which i need to send a https request to. I do not receieve anything from Salesforce when trying this. I have tried another https server and it works fine. I get an error message: ...
2
votes
0answers
108 views

Can we callout and chain a Queueable class?

I'll jump right into some code: public class ChainQueue implements Queueable, Database.AllowsCallouts { public void execute(QueueableContext context) { if(QueueUtil.hasNext()) { ...
1
vote
1answer
104 views

Display webservice callout return data on a VF Page without saving data in records

I'm kind of new on Salesforce. I've built an Apex class that makes a callout to a webservice and I want to display on a VFPage the data that the callout returns. I've just been able to accomplish it ...
1
vote
1answer
74 views

System.LimitException occurs in WSDL Class

I'm getting System.LimitException: Too many callouts: 101 error message in my WSDL class file generated by SFDC. Repeated error was shown as following: ...
2
votes
1answer
444 views

Webservice 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. I am randomly getting "(IO Exception: Read timed out)" exception. When the ...
0
votes
2answers
71 views

HTTP Callout returns HTML - can I load it into a new browser window?

I'm currently making a callout to a third party api from some Apex code triggered by a javascript button, sending info to fill out a web form on their end. The desired functionality is that the button ...
0
votes
1answer
30 views

Is Callout in a trigger always execute at the last, as sent email?

I have a callout in after trigger use asynchronous method, If Error happens in trigger execution, I want to cancel the Callout. Is there a way I can do that?
2
votes
1answer
49 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
24 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
40 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
102 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
48 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
129 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
107 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
151 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
35 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
105 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
61 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
398 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
71 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 ...