function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gregory Smith 10Gregory Smith 10 

Starting 14-May-16: Invalid Soap element is being returned by the API DescribeSobject call

Starting sometime in the past 3 days, describing an object (SOAP) returns a envelope with an obvious misspelling.  SOAP parsers (like WSC) will pick it up right away and fail.

6-mai-16 14:25:54          Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:deprecatedAndHidden' but found 'urn:partner.soap.sforce.com:deprprecatedAndHidden'
com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:deprecatedAndHidden' but found 'urn:partner.soap.sforce.com:deprprecatedAndHidden'

Salesforce QA must have missed this one;-) and I do not see a possible work-around. help! (or should I say helpp!)
Daniel BallingerDaniel Ballinger
What API version are you using and what pod/instance are you on?

Which sObjectType are you sending to describeSObject() (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describesobject.htm)?

I see in DescribeSObjectResult (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describesobjects_describesobjectresult.htmdeprecatedAndHidden is currently "Reserved for future use.". So it is odd that it is coming back at all. Can you share the full request and response? (obscure the session id)
Gregory Smith 10Gregory Smith 10
The org id is: 00DE0000000Y6AoMAK
The protocol is 34 (Summer '15).

One of our customers is seeing the issue and working on getting us direct access to their org (we are www.capstorm.com and run on a lot of instances -- this is the only site where the problem has occurred).

From the traceback we know that problem is being detected in WSC in the parsing of the SOAP response.  The top of the stack in on this line:

for( DescribeSObjectResult describeSObjectResult : sessionConnection.getBinding().describeSObjects(objectNames.toArray(new String[0]))) {

At this point, we do not know which object.
Gregory Smith 10Gregory Smith 10
Dave,

We have isolated the problem and will post the SOAP request/response messages to this thread early next week. The core problem is that describeSObjects returns different results (for particular objects) depending on how many objects are requested in a single call. We have seen this in the past for custom objects (the API reports phanmtom columns named LastViewedDate and LastReferencedDate for objects in packages if the package uses proctocol 28 or earlier BUT only when the objects are described in a list -- when described alone the column names are not returned.

This looks like the same sort of problem. By having the customer adjust the number of objects fetched by describeSObjects in a single call, the problem disappears. I sent the customer a custom bit of code to help isolate the exact SOAP request/response this morning.

Do you have any advice on how to get Salesforce to even pay attention to this sort of issue. Example: We have seen the "phantom column" issue on 3-4 salesforce instances around the world, wrote a short application (using just WSC calls) to demonstrate the problem, posted to this forum, and got no response. Given the nature of our business, we deal with lots of salesforce instances and crawl each of them exhaustively (e.g. if there is an API oddity we likely will encounter it). 
Daniel BallingerDaniel Ballinger
If you can isolate the problem and make it reproducable in a generic org then I could potentially raise it with support. Or I could request someone from support has a look at the question here. You could also try that yourself, by tweeting to https://twitter.com/asksalesforce. If you've got clear steps to reproduce the problem they will follow through.

Unfortunately it does mean you need to go through the pain of isolating and reproducing the problem, which can be time consuming.

If the problem is isolated to a particular customers org, you could ask them to raise the support case.

Do you have a reference for the problem with LastViewedDate and LastReferencedDate that is reproducible?
Gregory Smith 10Gregory Smith 10
We have isolated the deprecated issue but have no reason to believe that it happens on multiple orgs. On the LastViewedDate/LastReferencedDate issue, we have seen it on a few orgs but have long since coded around the issue (salesforce support said it was "impossible".)

When the following SOAP request is sent to the <<Customer>> instance (protocol 34), the response contains an undefined XML element.

------------ Request start   ----------
<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header><SessionHeader xmlns="urn:partner.soap.sforce.com"><sessionId>Obsucated</sessionId></SessionHeader></env:Header><env:Body><m:describeSObjects xmlns:m="urn:partner.soap.sforce.com" xmlns:sobj="urn:sobject.partner.soap.sforce.com"><m:sObjectType>AcceptedEventRelation</m:sObjectType><m:sObjectType>Account</m:sObjectType><m:sObjectType>AccountContactRole</m:sObjectType><m:sObjectType>AccountFeed</m:sObjectType><m:sObjectType>AccountHistory</m:sObjectType><m:sObjectType>AccountPartner</m:sObjectType><m:sObjectType>AccountShare</m:sObjectType><m:sObjectType>AccountTag</m:sObjectType><m:sObjectType>AccountTeamMember</m:sObjectType><m:sObjectType>ActionLinkGroupTemplate</m:sObjectType><m:sObjectType>ActionLinkTemplate</m:sObjectType><m:sObjectType>Action_Plan__Feed</m:sObjectType><m:sObjectType>Action_Plan__History</m:sObjectType><m:sObjectType>Action_Plan__Share</m:sObjectType><m:sObjectType>Action_Plan__Tag</m:sObjectType><m:sObjectType>Action_Plan__c</m:sObjectType><m:sObjectType>ActivityHistory</m:sObjectType><m:sObjectType>AdditionalNumber</m:sObjectType><m:sObjectType>Adoption_Snapshot__Tag</m:sObjectType><m:sObjectType>Adoption_Snapshot__c</m:sObjectType></m:describeSObjects></env:Body></env:Envelope>
------------ Request end   ----------

The invalid XML element is 'urn:partner.soap.sforce.com:deprprecatedAndHidden' (an obvious spelling mistake in the element name). The error is detected in the Salesforce WSC parser:

com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:deprecatedAndHidden' but found 'urn:partner.soap.sforce.com:deprprecatedAndHidden'

Note that the invalid XML element is not returned when a smaller number of sobject names is passed to the describeSObjects call but is always returned when this number (or a larger number) of sobjects are requested in a single call.
Erwin van ZijlErwin van Zijl

I am using the Partner WDSL and I also have issues with "https://login.salesforce.com/services/Soap/u/34.0" (and above) in C#.
In Visual Studio a reference file is automatically generated from the WSDL.
I created a new reference using the latest WSDL file.


In order to use the SforceService in C#, I had to manually alter the reference.cs file first due to the next error:
error CS0029: Cannot implicitly convert type 'XYZ.SalesforcePartner.ListViewRecordColumn' to 'XYZ.SalesforcePartner.ListViewRecordColumn[]'

Then I changed
[System.Xml.Serialization.XmlArrayItemAttribute("columns", typeof(ListViewRecordColumn), IsNullable=false)] 

into
[System.Xml.Serialization.XmlArrayItemAttribute("columns", typeof(ListViewRecordColumn[]), IsNullable=false)]

I found this solution at: http://www.fishofprey.com/2014/10/importing-salesforce-winter-15-partner.html

But then I got new errors:

The SforceService.describeSObject("Account") raises an Exception "The XML-document (1, 21624) contains an eror."
The SforceService.describeSObject("Contact") raises an Exception "The XML-document(1, 23521) contains an eror."
The SforceService.describeSObject("Lead") raises an Exception "The XML-document(1, 21186) contains an eror."

Note that if I set the Soap url to "https://login.salesforce.com/services/Soap/u/33.0", the describeSObject() function works just fine.

Sounds to me that the SforceService description is not up to date?

Regards, 
Erwin

 

Erwin van ZijlErwin van Zijl
Correction: I set the Soap url to "https://login.salesforce.com/services/Soap/u/29.0", the describeSObject() function works just fine.
Erwin van ZijlErwin van Zijl
I found this discussion similar to my problem: http://salesforce.stackexchange.com/questions/93553/winter-16-breaks-the-summer-15-partner-api-with-invalid-soaptype