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
Will M SmithWill M Smith 

Partner API describeSObject on Contact fails with “Instance validation error: 'urn:address' is not a valid value for soapType.”

We're trying to pull down picklist values from the Contact object to show on an ASP.Net page using the Partner API. However, we receive the following error when the describeSObject call is made.
 
"Instance validation error: 'urn:address' is not a valid value for soapType."

It appears that the API can not handle objects with compound fields such as address.
Here is a snippet of the code which we are using.
 
public sforce.DescribeSObjectResult[] getTableOfPickListValues(string fieldName, string[] objectName)
{
    List<string> aList = new List<string>();

    try
    {
        binding.QueryOptionsValue = new sforce.QueryOptions();
        binding.QueryOptionsValue.batchSize = 500;
        binding.QueryOptionsValue.batchSizeSpecified = true;
        return binding.describeSObjects(objectName);
    }
    catch (Exception error)
    {

    }
}

We've tried old and new versions of the API/WSDL and this issue appears to persist throughout.

Is this a known issue with the Salesforce partner API or are we doing something wrong? I can't seem to find anyone having reported this before...

For what it's worth, we've done this several times for custom objects so we know our code works.
 
NagendraNagendra (Salesforce Developers) 
Hi Smith,

Sorry for this issue you are facing.

May I suggest you please check with below link which might help. Hope this helps.

Thanks,
Nagendra
Will M SmithWill M Smith
Hi Nagendra.

This doesn't help unfortunately. We aren't trying to query compound address fields. We are trying to get the describe results for an sobject using 'describeSObjects'.