Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
HTTP/1.1 400 Bad Request Date: Fri, 22 May 2015 17:32:10 GMT Set-Cookie: BrowserId=D_3feNw7RYmP4DA;Path=/;Domain=.salesforce.com;Expires=Tue, 21-Jul-2015 17:32:10 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked [ { "errorCode" : "INVALID_ID_FIELD", "message" : "Invalid identifier: 0D5D0000000XZoHKAW" } ]
public class AccountUpdater { @Future(callout=true) public static void updateAccount(String id, String name) { //construct an HTTP request HttpRequest req = new HttpRequest(); req.setEndpoint('http://justsee.corp.aaaa.net/endpointurl.txt'); req.setMethod('GET'); //send the request Http http = new Http(); HttpResponse res = http.send(req); //check the response if (res.getStatusCode() == 200) { //update account Account acc = new Account(Id=id); acc.Description = res.getBody(); update acc; } else { System.debug('Callout failed: ' + res); } } }
this error 503 is Too many requests in an hour.
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<n1:login xmlns:n1="urn:partner.soap.sforce.com">
<n1:username>xxxxxxxx@gmail.com</n1:username>
<n1:password>xxxxxxxxxxxxxxx</n1:password>
</n1:login>
</env:Body>
</env:Envelope>';
$sessionid="";
$serverUrl="";
$header = array(
"Content-type: text/xml;charset=\"utf-8\"",
"SOAPAction: login");
$soap_do = curl_init();
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_URL, "https://login.salesforce.com/services/Soap/u/34.0" );
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true );
curl_setopt($soap_do, CURLOPT_POST, true );
curl_setopt($soap_do, CURLOPT_POSTFIELDS, $soap_request);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header);
$result = curl_exec($soap_do);