• sprak
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 9
    Replies
*** UPDATE 4 Feb 2005: It appears that one field was not having the utf8_encode function applied to it. Stupid error; you may now all point and laugh.



Greetings all; I recently had to code up a mechanism to insert/select cases into Salesforce via the SOAP API. Built everything up fine and began testing; eventually, some of the test cases included accented characters (umlauts, etc. e.g., ö). In these test cases, the insert call failed with the error message "java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence."

Having encountered this problem before, I scoured my archives and reminded myself that the text should be passed through utf8_encode() before making the SOAP call. No problem then; I wrapped each text item with a utf8_encode() call.

However, the problem still persists even after using utf8_encode(); now, the accented characters are being passed as values that look like garbage (e.g., �?¼). The same error message is returned from the SOAP call; scoping the wire shows that the SOAP headers are set to UTF-8 encoding.

Pretty stumped at this point; any help would be appreciated. Server details follows:

* Fedora Core 2
* Apache 2.0.51-2.7
* PHP 4.3.8 (cgi)
* PEAR::SOAP 0.8RC3
* Latest Salesforce client from Sourceforge

Cheers.

Message Edited by sprak on 02-04-2005 10:04 AM

  • January 31, 2005
  • Like
  • 0
Greetings; for the past week, our company has been having a problem in Salesforce. One case submitted through web-to-case seems to be recreating itself every five minutes or so. This has led to a build-up of over 2000 cases in our system. Not good at all.

We have shut off web-to-case, but the problem persists. Doing a tcpdump on our servers that send cases to www.salesforce.com have shown no traffic to that domain. Yet the case continues to create itself; has anyone else encountered this problem before? Do any of the sforce developers have an idea of what might be causing this or have tips on how to diagnose the problem further?
  • July 27, 2004
  • Like
  • 0
I have been using the PHP SalesForce SOAP client to insert leads into SalesForce; recently, anytime a lead insert call is made and the data contains an accented character (e.g., ö), the call fails and returns an error message in this format:
java.io.UTFDataFormatException: Invalid byte X of Y-byte UTF-8 sequence.

This problem first began on 15 April which is shortly after the various posts regarding the 3.0 API release appeared on the forum. I checked in SalesForce and have confirmed that numerous leads were generated via the same SOAP API call process prior to 13 April when the announcement post about 3.0 issues/bugs was made.
All other calls made without accented characters process fine.

Is anyone else experiencing this problem?

Gritty details:
PHP 4.2.2
PEAR 1.3
PEAR SOAP 0.8RC3 (beta)
URL for connecting to SalesForce = https://www.salesforce.com/services/Soap/u/2.5

--
Luis A. Cruz
lcruz[at]astaro]dot[com
  • April 21, 2004
  • Like
  • 0
Greetings all; I am attempting to create leads in SalesForce using the SOAP API. The data used to build the SOAP call comes from a HTML form that is submitted from our web site. It appears that when the form data includes utf8 type characters (special German characters, French characters, etc.) the SOAP call comes
back with the error message:
java.io.UTFDataFormatException Invalid byte 1 of 1-byte UTF-8 sequence

My form is setup like this:


But the page itself has no character encoding definition. I am using PHP for interfacing with the SalesForce API. Anyone out there know what needs to be done to ensure that these international characters go through?

Message Edited by sprak on 04-16-2004 11:47 AM

Message Edited by sprak on 04-16-2004 12:07 PM

  • April 16, 2004
  • Like
  • 0
Greetings; I came across an interesting problem while working with the 2.5 API. I was attempting to select the "DoNotCall" field for a Lead via a query call and was receiving the error message "INVALID_FIELD: Bad field name 'donotcall' in select list of query call". The field is defined as a standard SalesForce field in my Enterprise WSDL, so this was a very curious error message.

While staring at a Lead in the web UI, I noticed that the "DoNotCall" field was not being displayed. Checking our Lead page layout confirmed that the field was not being included in the page layout. It was the only clue I had at the time, so I searched the forums and ended up finding this post. It seems to confirm that if the field is not in the UI (is page layout a synonym for UI?) then you cannot access it via the API.

This seems like a "bad thing"(TM); if an administrator innocently removes a field from the UI, any applications using the API to access that field will suddenly break. Is there a way for the API call to force SalesForce to select all fields regardless of their inclusion in the UI?

Barring that, is there a way to add a field to the UI and keep it from being displayed? It seems possible as our Lead layout includes the "CurrencyIsoCode" field but does not display it to the user unless they edit the record. However, I have yet to find the option to do this when I edit the page layout itself.

Regards.

---
Luis A. Cruz
lcruz[at]astaro[dot]com
  • March 12, 2004
  • Like
  • 0
Greetings; using the PHP API, I created a lead in my SalesForce developer's account. The lead was created successfully, and all of the information appears to be present. However, when I log into SalesForce and attempt to search for the lead using the various search boxes scattered about, the lead is not found.

For example, I create a lead with the name "Luis Test". I log into SalesForce and search on "test"; the various accounts I have created with the word "test" in the name show up, but the lead does not show up. If I browse all open leads, I can find and view it.

Is there some field I am not setting in my create API call? Or is there some administrative setting that I am overlooking that is preventing the lead from being indexed for searches?

** Edit: I'm thinking of chalking this up to flaky behavior on the developement server. I created numerous leads with sporadic results; some would show up immediately in the search results, some would show up after a few minutes, and some would not show up at all. Came back into work this morning, logged in, and found that all of the leads I created yesterday were showing up in the search results.

Message Edited by sprak on 02-27-2004 06:47 AM

  • February 26, 2004
  • Like
  • 0
*** UPDATE 4 Feb 2005: It appears that one field was not having the utf8_encode function applied to it. Stupid error; you may now all point and laugh.



Greetings all; I recently had to code up a mechanism to insert/select cases into Salesforce via the SOAP API. Built everything up fine and began testing; eventually, some of the test cases included accented characters (umlauts, etc. e.g., ö). In these test cases, the insert call failed with the error message "java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence."

Having encountered this problem before, I scoured my archives and reminded myself that the text should be passed through utf8_encode() before making the SOAP call. No problem then; I wrapped each text item with a utf8_encode() call.

However, the problem still persists even after using utf8_encode(); now, the accented characters are being passed as values that look like garbage (e.g., �?¼). The same error message is returned from the SOAP call; scoping the wire shows that the SOAP headers are set to UTF-8 encoding.

Pretty stumped at this point; any help would be appreciated. Server details follows:

* Fedora Core 2
* Apache 2.0.51-2.7
* PHP 4.3.8 (cgi)
* PEAR::SOAP 0.8RC3
* Latest Salesforce client from Sourceforge

Cheers.

Message Edited by sprak on 02-04-2005 10:04 AM

  • January 31, 2005
  • Like
  • 0

Hi,

I'm using the PHP toolkit (php-client-53.zip) and currently trying some queries on my SF data. Now I expected to get an array as a result every time regardless of the actual count of records found. But obviously its quite different.

Two examples to illustrate my problem (the query results are being output by PHP's print_r()):

Query 1 result (exactly one match in my SF data):

stdClass Object
(
    [type] => Contact
    [Id] => 00320000001AWQIAA4
)

Query 2 (two matches in my SF data):

Array
(
    [0] => stdClass Object
        (
            [type] => Contact
            [Id] => 00320000001AMA6AAO
        )

    [1] => stdClass Object
        (
            [type] => Contact
            [Id] => 00320000001AMAOAA4
        )
 

As you can see, the query will deliver a simple "Object" if ONE match is found, but an array of "Objects" if TWO or more matches are found. Normally one would expect it to be an array (with only one "Object") in the case of one match as well.

So, how am I supposed to walk through the result in a for- or while-loop, that will work in each case?

Any help appreciated!

-Harry

  • August 13, 2004
  • Like
  • 0
Greetings; for the past week, our company has been having a problem in Salesforce. One case submitted through web-to-case seems to be recreating itself every five minutes or so. This has led to a build-up of over 2000 cases in our system. Not good at all.

We have shut off web-to-case, but the problem persists. Doing a tcpdump on our servers that send cases to www.salesforce.com have shown no traffic to that domain. Yet the case continues to create itself; has anyone else encountered this problem before? Do any of the sforce developers have an idea of what might be causing this or have tips on how to diagnose the problem further?
  • July 27, 2004
  • Like
  • 0
I have been using the PHP SalesForce SOAP client to insert leads into SalesForce; recently, anytime a lead insert call is made and the data contains an accented character (e.g., ö), the call fails and returns an error message in this format:
java.io.UTFDataFormatException: Invalid byte X of Y-byte UTF-8 sequence.

This problem first began on 15 April which is shortly after the various posts regarding the 3.0 API release appeared on the forum. I checked in SalesForce and have confirmed that numerous leads were generated via the same SOAP API call process prior to 13 April when the announcement post about 3.0 issues/bugs was made.
All other calls made without accented characters process fine.

Is anyone else experiencing this problem?

Gritty details:
PHP 4.2.2
PEAR 1.3
PEAR SOAP 0.8RC3 (beta)
URL for connecting to SalesForce = https://www.salesforce.com/services/Soap/u/2.5

--
Luis A. Cruz
lcruz[at]astaro]dot[com
  • April 21, 2004
  • Like
  • 0
Greetings; I came across an interesting problem while working with the 2.5 API. I was attempting to select the "DoNotCall" field for a Lead via a query call and was receiving the error message "INVALID_FIELD: Bad field name 'donotcall' in select list of query call". The field is defined as a standard SalesForce field in my Enterprise WSDL, so this was a very curious error message.

While staring at a Lead in the web UI, I noticed that the "DoNotCall" field was not being displayed. Checking our Lead page layout confirmed that the field was not being included in the page layout. It was the only clue I had at the time, so I searched the forums and ended up finding this post. It seems to confirm that if the field is not in the UI (is page layout a synonym for UI?) then you cannot access it via the API.

This seems like a "bad thing"(TM); if an administrator innocently removes a field from the UI, any applications using the API to access that field will suddenly break. Is there a way for the API call to force SalesForce to select all fields regardless of their inclusion in the UI?

Barring that, is there a way to add a field to the UI and keep it from being displayed? It seems possible as our Lead layout includes the "CurrencyIsoCode" field but does not display it to the user unless they edit the record. However, I have yet to find the option to do this when I edit the page layout itself.

Regards.

---
Luis A. Cruz
lcruz[at]astaro[dot]com
  • March 12, 2004
  • Like
  • 0

Hi,

I'm testing enterprise Edition of Salesforce to try to manage some of the data from salesforce externally from our web site.

I have done step by step everything explained in the "Using sforce with PHP".

My web hosting provider don't have installed SOAP and they aren't going to install it, so my next option was to install an Apache, PHP, and everything on my own computer and make it work as an internet server.

After installing every file of the PHP example and execute it I introduce the "username" and "password" in the login.php form and I obtain the next result:

Error: curl_exec error 60 SSL certificate problem, verify that the CA cert

I have reinstalled PHP, but the error it's still the same. (I saw over the board that some person had the same error, but the "solution" was to reinstall, and please note that I'm running my own server on a LAN, so maybe my problem it's different)

What is happening? Any solution? What I'm doing wrong?

the example files are from: sforce.sourceforge.net

Best Regards,

Xavi

  • February 27, 2004
  • Like
  • 0