• coling
  • NEWBIE
  • 40 Points
  • Member since 2005

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 28
    Questions
  • 59
    Replies
Hi Everyone,

My app, BizConnector, which has been operating for customers for ten years, has recently been experiencing an unusual problem.

It gets random invalid error responses for Soap login requests when it tries to log in to a specific client account.

This is happening for one client only - no other clients are experiencing this problem. It is happening randomly - it is not consistent. It is possible to receive an error response at one time, and then (subsequently) successfully log in at another time - with no changes to username or password in between.

Evidence for this is found in BizConnector logs, an example is shown below.

Log entry: 2015-02-26 13:58:05:
last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:CallOptions><ns1:client>E.../BizConnector</ns1:client><ns1:defaultNamespace xsi:nil="true"/></ns1:CallOptions></SOAP-ENV:Header><SOAP-ENV:Body><ns1:login><ns1:username>...username provided....</ns1:username><ns1:password>.......password provided.......</ns1:password></ns1:login></SOAP-ENV:Body></SOAP-ENV:Envelope>

last_request_hdrs=POST /services/Soap/u/24.0 HTTP/1.1
Host: login.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 538

last_response=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_LOGIN</faultcode><faultstring>INVALID_LOGIN: Invalid username, password, security token; or user locked out.</faultstring><detail><sf:LoginFault xsi:type="sf:LoginFault"><sf:exceptionCode>INVALID_LOGIN</sf:exceptionCode><sf:exceptionMessage>Invalid username, password, security token; or user locked out.</sf:exceptionMessage></sf:LoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> 

Has anyone had a similar experience? The random nature of this error is puzzling.

Any help is appreciated.

Thanks

Colin Goldberg
 
  • March 05, 2015
  • Like
  • 0
Hi,

My app, BizConnector (/Lead Follow-Up) is getting invalid error responses for some of its customers when it attempts to log in via the SOAP API. This app has been running since 2007 and successfully logs in on behalf of most of its customers 24/7 - and has been doing so for years. This kind of invalid response is only evident for a few customers, and has only started behaving like this recently.

One particular customer has a maximum quota of 15000 but is getting these error responses even though the actual API count is only in the hundreds. BizConnector counts API requests, and, for example shows the following counts over the last few days.

8/9 1157
8/10 836
8/11 984
8/12 836
8/13 113

A sample API request and response are below. This is clearly a Salesforce bug and needs to be fixed. 

last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:CallOptions><ns1:client>Expresiv/BizConnector</ns1:client><ns1:defaultNamespace xsi:nil="true"/></ns1:CallOptions></SOAP-ENV:Header><SOAP-ENV:Body><ns1:login><ns1:username>--username provided--</ns1:username><ns1:password>--password provided--</ns1:password></ns1:login></SOAP-ENV:Body></SOAP-ENV:Envelope>

last_request_hdrs=POST /services/Soap/u/24.0 HTTP/1.1
Host: login.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 529


last_response=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:REQUEST_LIMIT_EXCEEDED</faultcode><faultstring>REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>REQUEST_LIMIT_EXCEEDED</sf:exceptionCode><sf:exceptionMessage>TotalRequests Limit exceeded.</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


I look forward to prompt attention to this matter.

Colin Goldberg

  • August 13, 2014
  • Like
  • 0
Hi,

I have just submitted a case to support, but someone here may also have some insight.

I am getting error response 'Invalid byte 1 of 1-byte UTF-8 sequence' from Soap request using partner wsdl to a customer account.

Using PHP Toolkit.

PHP Snippet:
...
$sObject = new SObject();
$sObject->type = 'Follow_Up_Lead_Message_History__c';
$sObject->fields = <<<<as below - my customer's data>>>>
(
    [BizConnector_ID__c] => 7373925
    [Mailing_ID__c] => 8894840
    [From_Name__c] => Your Friends at <customer company>
    [From_Email__c] => <<customer email address>>
    [Message_Sent__c] => https://secure.bizconnector.com/sf/tab/msg/detail/msg_sent.php?user_id=1097~f_action=get_msg_sent~mailing_id=8894840~sent_id=7373925
    [Subject__c] => 5 Facts about your Dog you DIDN'T know
    [RuleName__c] => CASF2013
    [Lead__c] => 00Q5000000iITiTEAW
)
$res = $sf_connection->create(array ($sObject));

The log shows:
last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:sobject.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:partner.soap.sforce.com"><SOAP-ENV:Header><ns2:SessionHeader><ns2:sessionId>00D50000000JImf!ARgAQBEAWjsrsr0BUNqL8yQnnJwHf5uwR59QpyghG1mP48U4qJuEVqOG.Ma35AVmsi6SgCRxAcP8drx4M1y2JaBCGf4SJzKY</ns2:sessionId></ns2:SessionHeader><ns2:CallOptions><ns2:client>xxxxx</ns2:client><ns2:defaultNamespace xsi:nil="true"/></ns2:CallOptions></SOAP-ENV:Header><SOAP-ENV:Body><ns2:create><ns2:sObjects><ns1:type>Follow_Up_Lead_Message_History__c</ns1:type><ns1:Id xsi:nil="true"/><BizConnector_ID__c>7373925</BizConnector_ID__c><Mailing_ID__c>8894840</Mailing_ID__c><From_Name__c>Your Friends at xxxxx</From_Name__c><From_Email__c>xxx@xxxx.com</From_Email__c><Message_Sent__c>https://secure.bizconnector.com/sf/tab/msg/detail/msg_sent.php?user_id=109651~f_action=get_msg_sent~mailing_id=8894840~sent_id=7373925</Message_Sent__c><Subject__c>5 Facts about your Dog you DIDN'T know</Subject__c><RuleName__c>CASF2013 </RuleName__c><Lead__c>00Q5000000iITiTEAW</Lead__c></ns2:sObjects></ns2:create></SOAP-ENV:Body></SOAP-ENV:Envelope>

last_request_hdrs=POST /services/Soap/u/24.0/00D50000000JImf HTTP/1.1
Host: na3.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 1282


last_response=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Invalid byte 1 of 1-byte UTF-8 sequence.</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

This error has occurred/is occurring with only one customer. It started on 12/31/2013, and seems to be related to this customer only (it seems that it may be ongoing). This leads me to think that it is data-specific, but I do not see anything wrong with the contents of the fields. I do not see evidence of this error elsewhere, and this code has been operating - without this error - since 2007.

I must be missing something - can anyone see what I am missing?

Thanks in anticipation.

Colin Goldberg


  • January 10, 2014
  • Like
  • 0

Hi,

 

I am getting empty count results from a GROUP BY query executed through the php toolkit - using the latest partner wsdl (v20).

 

Here is the query:

 

SELECT LeadSource, COUNT(Id) from Lead  GROUP BY LeadSource

 

Using the php print_r function, here is a sample of the results returned in the response records. There is only one entry for [fields] - the count is not returned.

 

Array
(
    [0] => SObject Object
        (
            [type] => AggregateResult
            [fields] => stdClass Object
                (
                    [LeadSource] =>
                )

        )

    [1] => SObject Object
        (
            [type] => AggregateResult
            [fields] => stdClass Object
                (
                    [LeadSource] => Web
                )

        )

    [2] => SObject Object
        (
            [type] => AggregateResult
            [fields] => stdClass Object
                (
                    [LeadSource] => Phone Inquiry
                )

        )

...

 

Would the php toolkit have anything to do with this problem? Is there something else that I have missed?

 

Thanks in anticipation.

 

Colin G

 

  • December 10, 2010
  • Like
  • 0

Hi,

 

I have used the PHP Toolkit for some time now, but I seem to have missed something in my effort to create a FeedPost record using the Partner WSDL. Is this enabled?

 

Logged in to my chatterdev org, I am using WSDL version 18, but describeGlobal does not show any of the Feed objects (FeedPost, AccountFeed, etc.). (create() on FeedPost returns INVALID_TYPE).

 

Is there something I need to enable that I have missed? Any help would be appreciated.

 

Thanks

 

Colin Goldberg

 

  • April 10, 2010
  • Like
  • 0

Hi Everyone,

 

Does anyone have a clear example of how to create a custom object with multiple fields using the Metadata API?

 

The sample provided with the PHP Toolkit - at http://wiki.developerforce.com/index.php/PHP_Toolkit_13.0_Metadata_Create_Sample - works but only creates one field. Creating additional fields is a further challenge.

 

I am not sure if one can create the object and all fields in one create call, or if the additional fields need to be created in separate calls.

 

Thanks in anticipation.

 

Regards

Colin Goldberg

 

  • August 21, 2009
  • Like
  • 0

Hi All,

 

Does anyone know ifthe User Reply-To email address and signature accessible via the API? I have not been able to identify where these fields might be, and if they are accessible or not.

 

Thanks in anticipation.

 

Colin Goldberg

 

Hi there,

On behalf of multiple users of my app, I am seeing a strange (and new) error message for SOQL calls from my external php script. I wonder if anyone else has seen the same thing.

This has only started recently. To make matters worse, this is happening intermittently.

For example:

INVALID_FIELD:
LastModifiedDate from Lead where Rating = 'Appointment'  AND Rating_Stage__c
                                 ^
ERROR at Row:1:Column:73
No such column 'Rating' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.
 last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com"><SOAP-ENV:Header><ns1:SessionHeader><ns1:sessionId>4c3300D300000000NP8!ARYAQGXabi9hjTpvOz8PQJcSqRRmqMI1FytodtYLu4SId1YouyBLmfsdHwbC0HbCLpLNatoxWvS7YknC3oZDV4NNDYjmpogj</ns1:sessionId></ns1:SessionHeader><ns1:QueryOptions><ns1:batchSize>50</ns1:batchSize></ns1:QueryOptions><ns1:CallOptions><ns1:client>xx</ns1:client></ns1:CallOptions></SOAP-ENV:Header><SOAP-ENV:Body><ns1:query><ns1:queryString>SELECT Id, Email, Status, CreatedDate, LastModifiedDate from Lead where Rating = 'Appointment'  AND Rating_Stage__c != 'None'  AND Day_of_Visit__c != ''  and  Id = '00Q5000000MJVoKEAX'  and IsConverted = False  and IsDeleted = False </ns1:queryString></ns1:query></SOAP-ENV:Body></SOAP-ENV:Envelope>

 last_request_hdrs=POST /services/Soap/u/8.0/4c3300D300000000NP8 HTTP/1.1
Host: na2-api.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.0
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 872

As you can see, 'Rating' is a Standard field!! The error message is perplexing, to say the least. Anyone else have this problem?

I also have examples of the same kind of error message, where the field referenced is a Custom field - this is not limited to Standard fields.

I have logged a case for this but support seems to be distracted at this time (what's going on?) - hence this posting.

I sincerely hope that someone can help.

Thanks in anticipation.

Colin Goldberg


  • September 17, 2008
  • Like
  • 0
Hi,

I would like to be able to rerieve a VisualForce page with an http(s) request from within a script running on my server (not having been invoked within a Salesforce session). This, however, requires that the script is 'logged in' - ie. this is not the same as logging in through the web services API. How would this be done? What login sequence, cookies, etc. are needed by the script to enable this?

Colin Goldberg


Hi again,

I am sure the answer to this is simple - I just can't see it.

I am using PHP Toolkit 11.0 with Enterprise wsdl. When I run a query (on a custom object), PHP does not get all of the result fields, even though all requested fields are being returned in the SOAP response. I cleared the wsdl cache before running this.

Here is a code snippet, a PHP dump of the result, and the SOAP parts. The missing field is Client_Timezone__c.

Code snippet re query:

function getMCMClientProfile($wc='') {
    global $sf_connection;
    $query = "Select Id, Name, Client_Phone_Number__c, Reject_Calls_From__c, Client_Timezone__c, ...(other fields)
            from MCM_Client__c  " . $wc;
    try {
        $queryOptions = new QueryOptions(50);
        $response = $sf_connection->query(($query), $queryOptions);
        $p_response = print_r($response, true);
        echo "getMCMClientProfile: response=$p_response\n"; // A
        $last_request = $sf_connection->getLastRequest();
        echo "getMCMClientProfile: last_request=$last_request\n"; // B
        $last_request_hdrs = $sf_connection->getLastRequestHeaders();
        echo "getMCMClientProfile: last_request_hdrs=$last_request_hdrs\n"; // C
        $last_response = $sf_connection->getLastResponse();
        echo "getMCMClientProfile: last_response=$last_response\n"; // D
        ...
       
A: --- PHP Dump: Client_Timezone__c is missing
getMCMClientProfile: response=stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [Id] => a0670000002FZVdAAO
                    [Client_Phone_Number__c] => 914 555-1212
                    [Name] => Market Arch
                    [Reject_Calls_From__c] => Alabama;Hawaii
                    ...(other fields) <----------- Client_Timezone__c is missing
                )

        )

    [size] => 1
)


B: last_request
getMCMClientProfile: last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:enterprise.soap.sforce.com"><SOAP-ENV:Header><ns1:SessionHeader><ns1:sessionId>461700D70000000K7PB!ARMAQEciKYNI24gPu2kL09V3cgtt8s7w3GDUKftmZN6f4CjNMsf5IlFHzoGQhULQbgrwijdzDnmwgwpBghWktndP9cgXmW2q</ns1:sessionId></ns1:SessionHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:query><ns1:queryString>Select Id, Name, Client_Phone_Number__c, Reject_Calls_From__c, Client_Timezone__c, &#13;
...(other fields)
            from MCM_Client__c  where Id = 'a0670000002FZVdAAO'</ns1:queryString></ns1:query></SOAP-ENV:Body></SOAP-ENV:Envelope>


C: last_request_hdrs
getMCMClientProfile: last_request_hdrs=POST /services/Soap/c/12.0/461700D70000000K7PB HTTP/1.1
Host: na5-api.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.0
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 1083


D: -- last_response: Note that Client_Timezone__c is present
getMCMClientProfile: last_response=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:sobject.enterprise.soap.sforce.com">
<soapenv:Body>
<queryResponse>
<result>
<done>true</done>
<queryLocator xsi:nil="true"/>
<records xsi:type="sf:MCM_Client__c">
<sf:Id>a0670000002FZVdAAO</sf:Id>
<sf:Client_Phone_Number__c>914 555-1212</sf:Client_Phone_Number__c>
<sf:Client_Timezone__c>(GMT-05:00) Eastern Standard Time (America/New_York)</sf:Client_Timezone__c>
<sf:Name>Sample Name</sf:Name>
<sf:Reject_Calls_From__c>Alabama;Hawaii</sf:Reject_Calls_From__c>
...
</records>
<size>1</size>
</result>
</queryResponse>
</soapenv:Body>
</soapenv:Envelope>

Why does Client_Timezone__c get lost on the way to PHP??? Can anyone help?

Any comments or pointers are very much appreciated.

Colin Goldberg

  • March 06, 2008
  • Like
  • 0
Hi There,

I must be tired.

Using the new PHP Toolkit (11.0) and Enterprise wsdl API v 12.0, I am only getting the Id field in the result.

Code snippet:
...
$get_query_fields = getSFQueryFields('Toll_Free_Number__c');
echo "query_fields=$get_query_fields\n";
$query = "SELECT $get_query_fields from Toll_Free_Number__c where Name='$phone_number'";
try {
  $queryOptions = new QueryOptions(50);
  $response = $sf_connection->query(($query), $queryOptions);
  $p_response = print_r($response, true);
  echo "response=$p_response\n";
  ...
}
...

Result:
query_fields=Id, IsDeleted, Name, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, LastActivityDate, Campaign__c
response=stdClass Object
(
    [done] => 1
    [queryLocator] =>
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [Id] => a0870000001NxOZAA0
                )

        )

    [size] => 1
)

It should be obvious to me but it isn't. What am I doing wrong?

Colin G


  • February 28, 2008
  • Like
  • 0
Hi All,

I would like to access a rendered Visualforce page via the API. Which API version will allow this? Any chance for PHP?

Colin Goldberg


Message Edited by dchasman on 11-09-2007 07:24 PM

  • November 09, 2007
  • Like
  • 0
For your Salesforce Development and Integration needs:
- SControls
- Data Migration
- Integration with other applications
- Salesforce Configuration
- Software Evaluations
- Strategy Consulting

Contact MacMicro for more information. www.macmicro.com


  • August 28, 2007
  • Like
  • 0
Hi,

What merge field do I use to detect Professional or Enterprise - or other - Edition in a Partner app?

Thanks

CG


Hi,

As a newbie with regard to Outbound Messaging, I created an Outbound Message and a Workflow Rule in my developer account with one action (to send an Outbound Message) for leads whenever a lead was created or edited. With the endpoint (http://...../sf_listener.php) not yet in existence, I created a new lead, but no entry appeared in the Outbound Message Delivery queue. The documentation states "If the endpoint is unavailable, messages will stay in the queue until sent successfully, or until they are 24 hours old".  Is there a setting I missed - eg. to enable Outbound Messaging?

CG


Hi all,

When I try to download a partner wsdl from Setup -> Integrate -> Apex API -> Download Partner WSDL, it only gives me version 9.0. How do I get hold of version 8.0?

Thanks

CG


Hi,

In the process of planning to publish an app - and more apps to follow that relate to the first one, what's the recommendation for naming the managed package (from one org) vs naming the custom app(s) within it? If my first app is named X, can the managed package also be named X? Or should the package name be more like 'X Pack'?

Also, how are package and app names presented in the directory - are they both listed? Is a prospective installer aware that an app is available within a package? Is (s)he installing the package as a whole or just the app?

CG


  • April 20, 2007
  • Like
  • 0
Do You Need A
 - Project Manager
 - Architect/Developer
 For Your Salesforce.com Project?
 
 I have experience
  - with Salesforce.com API
  - developing AppExchange apps
  - in service-oriented architectures
  - managing projects from start to end
 
  Please contact me at coling@macmicro.com for more information.
 
  Colin Goldberg
  President
  MacMicro Inc


  • March 27, 2007
  • Like
  • 0
Hi,

In testing my (Partner) app with a Professional Edition account, I am getting an error logging in through the API (using PHP Toolkit 1.0.6)

"API is not enabled for this Organization or Partner"

The following PHP snippet shows that setClientId is called before the login::

$sf_client_id = "[Client Id supplied by Salesforce.com on certification]";

function sf_login($user_id, $wsdl, $username, $password) {
  global $sf_connection;
  global $sf_client_id;
  $loginResult = null;
  $errors = "";
  if (($username != "") && ($password != "")) {
      try {
        $sf_connection = new SforcePartnerClient();
        $sf_connection->createConnection($wsdl);
        $sf_connection->setClientId($sf_client_id);
        $loginResult = $sf_connection->login($username, $password);
   
        $location = $sf_connection->getLocation();
        $sessionId = $sf_connection->getSessionId();
      } catch (Exception $e) {
...
      }
...
}

The request sent is:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com">
<SOAP-ENV:Body>
<ns1:login>
<ns1:username>[professional edition account username supplied]</ns1:username>
<ns1:password>[professional edition account password supplied]</ns1:password>
</ns1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Request header:
POST /services/Soap/u/7.0 HTTP/1.1
Host: www.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.0
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 317


Response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>sf:API_DISABLED_FOR_ORG</faultcode>
<faultstring>API_DISABLED_FOR_ORG: API is not enabled for this Organization or Partner</faultstring>
<detail><sf:fault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>API_DISABLED_FOR_ORG</sf:exceptionCode><sf:exceptionMessage>API is not enabled for this Organization or Partner</sf:exceptionMessage></sf:fault></detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Can you help?

Thanks

Colin Goldberg


  • March 22, 2007
  • Like
  • 0
Hi All,

What's the best way to structure the SF interface for an app to poll a SF user's data outside the browser session? For example, polling Contacts or Leads from an app partner website on a regular basis to check for new records. Apex may replace this functionality in the future, but until then, what to do?

Two issues arise:
1) An SF username and password are needed to establish a session, and the password needs to be passed to SF through the API in plaintext (any alternatives that I am not aware of?). So before the app can poll, it has to have a password in plaintext that it can use. SF users may balk (probably would) at giving away their password, especially if there is no protection against their other data that they don't want the app to access.
2) Sharing Rules may alleviate the problem. For example, create a Sharing Rule that gives access to the specific data - and no other. But can a user (administrator) give access through Sharing Rules to an app?

One possible solution may be to ask the user to create a 'proxy' user (through the administrator) with a username/password that can be more comfortably provided to the app so that it can do its job. Would this work?

Perhaps their is a 'best practice' that I am just not seeing here. What is the Salesforce recommended practice. Can anyone help?

Thanks

Colin Goldberg

  • October 27, 2006
  • Like
  • 0
Hi Everyone,

My app, BizConnector, which has been operating for customers for ten years, has recently been experiencing an unusual problem.

It gets random invalid error responses for Soap login requests when it tries to log in to a specific client account.

This is happening for one client only - no other clients are experiencing this problem. It is happening randomly - it is not consistent. It is possible to receive an error response at one time, and then (subsequently) successfully log in at another time - with no changes to username or password in between.

Evidence for this is found in BizConnector logs, an example is shown below.

Log entry: 2015-02-26 13:58:05:
last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:CallOptions><ns1:client>E.../BizConnector</ns1:client><ns1:defaultNamespace xsi:nil="true"/></ns1:CallOptions></SOAP-ENV:Header><SOAP-ENV:Body><ns1:login><ns1:username>...username provided....</ns1:username><ns1:password>.......password provided.......</ns1:password></ns1:login></SOAP-ENV:Body></SOAP-ENV:Envelope>

last_request_hdrs=POST /services/Soap/u/24.0 HTTP/1.1
Host: login.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 538

last_response=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:INVALID_LOGIN</faultcode><faultstring>INVALID_LOGIN: Invalid username, password, security token; or user locked out.</faultstring><detail><sf:LoginFault xsi:type="sf:LoginFault"><sf:exceptionCode>INVALID_LOGIN</sf:exceptionCode><sf:exceptionMessage>Invalid username, password, security token; or user locked out.</sf:exceptionMessage></sf:LoginFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope> 

Has anyone had a similar experience? The random nature of this error is puzzling.

Any help is appreciated.

Thanks

Colin Goldberg
 
  • March 05, 2015
  • Like
  • 0
Hi,

My app, BizConnector (/Lead Follow-Up) is getting invalid error responses for some of its customers when it attempts to log in via the SOAP API. This app has been running since 2007 and successfully logs in on behalf of most of its customers 24/7 - and has been doing so for years. This kind of invalid response is only evident for a few customers, and has only started behaving like this recently.

One particular customer has a maximum quota of 15000 but is getting these error responses even though the actual API count is only in the hundreds. BizConnector counts API requests, and, for example shows the following counts over the last few days.

8/9 1157
8/10 836
8/11 984
8/12 836
8/13 113

A sample API request and response are below. This is clearly a Salesforce bug and needs to be fixed. 

last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:CallOptions><ns1:client>Expresiv/BizConnector</ns1:client><ns1:defaultNamespace xsi:nil="true"/></ns1:CallOptions></SOAP-ENV:Header><SOAP-ENV:Body><ns1:login><ns1:username>--username provided--</ns1:username><ns1:password>--password provided--</ns1:password></ns1:login></SOAP-ENV:Body></SOAP-ENV:Envelope>

last_request_hdrs=POST /services/Soap/u/24.0 HTTP/1.1
Host: login.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 529


last_response=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>sf:REQUEST_LIMIT_EXCEEDED</faultcode><faultstring>REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>REQUEST_LIMIT_EXCEEDED</sf:exceptionCode><sf:exceptionMessage>TotalRequests Limit exceeded.</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


I look forward to prompt attention to this matter.

Colin Goldberg

  • August 13, 2014
  • Like
  • 0

Hello there,

 

Im having trouble on how to create a listener of salesforce outbound message. Do you have a step-by-step lesson on how to create a salesforce outbound listener ? specially in java and php language ? Please help me.

 

Kind Regards,

 

John

Hi all, I have a question why such a query works

SELECT COUNT() FROM OpportunityHistory WHERE  OpportunityId IN (SELECT Id FROM Opportunity WHERE CreatedDate = THIS_WEEK)

 and such an error

SELECT COUNT_DISTINCT(OpportunityId) FROM OpportunityHistory WHERE  OpportunityId IN (SELECT Id FROM Opportunity WHERE CreatedDate = THIS_WEEK)

 

ERROR:

 

 Invalid argument supplied for foreach() in /var/www/dev.local/system/libraries/salesforce/SforcePartnerClient.php on line 344

Is there a way utilizing the PHP API to read an objects schema and list its meta data.

 

I would like to be able to pass an object name and see all of the field names and their types and even better if the type happens to be a picklist to determine what the available options are.

 

Can someone point me in the right direction or provide a sample?

 

Hi,

 

I am getting empty count results from a GROUP BY query executed through the php toolkit - using the latest partner wsdl (v20).

 

Here is the query:

 

SELECT LeadSource, COUNT(Id) from Lead  GROUP BY LeadSource

 

Using the php print_r function, here is a sample of the results returned in the response records. There is only one entry for [fields] - the count is not returned.

 

Array
(
    [0] => SObject Object
        (
            [type] => AggregateResult
            [fields] => stdClass Object
                (
                    [LeadSource] =>
                )

        )

    [1] => SObject Object
        (
            [type] => AggregateResult
            [fields] => stdClass Object
                (
                    [LeadSource] => Web
                )

        )

    [2] => SObject Object
        (
            [type] => AggregateResult
            [fields] => stdClass Object
                (
                    [LeadSource] => Phone Inquiry
                )

        )

...

 

Would the php toolkit have anything to do with this problem? Is there something else that I have missed?

 

Thanks in anticipation.

 

Colin G

 

  • December 10, 2010
  • Like
  • 0

Hey all, if you have a chance, think about signing up for and coming to the mothership in San Francisco this Thursday for our latest developer meetup.

 

This one is slightly different in that it is only one track, and both sessions are Chatter-related. The first session is an intro to developing with Chatter, and the second session is an advanced Chatter development session. Like always, experts will be on hand to answer questions and give feedback.

 

We'll also feed you beer and pizza -- how good does it get? Hope to see you all there! Please sign up by clicking here!

  • April 12, 2010
  • Like
  • 0

Hi,

 

I have used the PHP Toolkit for some time now, but I seem to have missed something in my effort to create a FeedPost record using the Partner WSDL. Is this enabled?

 

Logged in to my chatterdev org, I am using WSDL version 18, but describeGlobal does not show any of the Feed objects (FeedPost, AccountFeed, etc.). (create() on FeedPost returns INVALID_TYPE).

 

Is there something I need to enable that I have missed? Any help would be appreciated.

 

Thanks

 

Colin Goldberg

 

  • April 10, 2010
  • Like
  • 0
We’re looking for a developer who can put together a PHP page that will take a SOAP message, dispatched by SalesForce (as an outbound message that is part of the Workflow and Approvals rules), and convert this message to an object structure (such as an associative array) that will allow us to pull off the SalesForce fields and use them in the rest of our PHP page.
 
We will set up a rule in SalesForce to send lead information (such as firstName, lastName, etc) to http://www.ourwebserver.com/test.php. If we were sending this as an HTTP post, we would simply pull off the name-value-pairs from the request object using $firstName = $_REQUEST[‘firstName’]. With a SOAP request, we want a piece of code inserted on this page that will decode the XML structure and allow us to get these parameters by calling a well-defined object name, for example $firstName = $requestObject[‘firstName’];

Please let me know if you or someone you know of can help us with this.
Thanks

Sammy
Message Edited by MAnd on 04-30-2009 08:22 AM
  • April 30, 2009
  • Like
  • 0
Hi,

I would like to be able to rerieve a VisualForce page with an http(s) request from within a script running on my server (not having been invoked within a Salesforce session). This, however, requires that the script is 'logged in' - ie. this is not the same as logging in through the web services API. How would this be done? What login sequence, cookies, etc. are needed by the script to enable this?

Colin Goldberg


I am the web developer of a Software Company, we have recently started to use Salesforce.

My understanding of standard web-to-lead is the form has to post to Saleforce website.
I already have a large amount of forms on our website that have a lot of functionality and need to post to within my website. I wanted to be able to grab the leads from these forms quickly and easily while still keeping the functionality that is already in place.

I found an App called FormVester, it seemed ideal for this but I don't think it's supported any longer.

Anyone know of any other way of achieving this?

Hi All,

I want to create a outbound message notification server in php, which will inturn invoke a custom php function.
Please tell me how to access outbound message using php.

Regards,
Veena.
  • April 29, 2008
  • Like
  • 0
Hi all:
   Does anyone know if it is possible to sync back to MYSQL database to check something and bring it back to salesforce from salesforce. Like if I create a button called sync. I would want it to go back to MYSQL check it see if it there and then send a message to or answers to salesforce.com ...
Thanks
Shan