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
Paul KellerPaul Keller 

API Error - Unable to find a deserializer for the type common.api.soap.wsdl.QueryResult

I am using the most current Force.com Toolkit for PHP provided at https://developer.salesforce.com/page/PHP_Toolkit to do this API push. I can authenticate and query salesforce without any issue, however when I attempt to create a lead, Salesforce responds back with an error "Unable to find a deserializer for the type common.api.soap.wsdl.QueryResult Error Id: 39234132-20621 (-848058548)"

Here is the SOAP data we are sending salesforce:
 
<?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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns1:SessionHeader>
<ns1:sessionId>00D1a000000JetW!AQIAQJqI9ahtjmZI2urRBcTQaq6MX0iu.1y93JKc3j06U99YIi39oEJ8ryvfbLlESvOFpczPOf0wsmnSiQLYpD7SRSUajA5j</ns1:sessionId>
</ns1:SessionHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:create>
<ns1:sObjects xsi:type="ns1:Lead">
<Name>John Doe</Name>
<Email>johndoe@example.com</Email>
<City>BEVERLY HILLS</City>
<Reason__c>BECOME AN APPLICATOR         -</Reason__c>
<Phone>(555)555-1212</Phone>
<Sq_Footage__c>0</Sq_Footage__c>
<Industry>*APPLICATOR</Industry>
<Own_Equipment__c>FALSE</Own_Equipment__c>
<Type_of_Building__c></Type_of_Building__c>
<PostalCode>90210</PostalCode>
<State>CA</State>
<Referrer__c>GOOGLE AD</Referrer__c>
<Referring_Page__c>Google</Referring_Page__c>
<Project_Type__c></Project_Type__c>
<Company>John Doe, Inc.</Company>
<Completion_Deadline__c></Completion_Deadline__c>
<Current_Supplier__c>Home Depot</Current_Supplier__c>
<Notes>Testing API Testing Line 2</Notes>
</ns1:sObjects>
</ns1:create>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
And here is the SOAP response from Salesforce:
 
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>Unable to find a deserializer for the type common.api.soap.wsdl.QueryResult Error Id: 39234132-20621 (-848058548)</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
 
Chris VogelerChris Vogeler
Hi Paul,

I just ran into a similar problem updating "Account" data. The problem is the handling of compound fields. I was expexting to write all address fields as a XML substructure (since I recieve them this way from Salesforce). So instead of building a tree structure
  • account
    • name
    • ...
    • BillingAddress
      • City
      • Street
      • ...
you need to send it flat
  • account
    • name
    • ...
    • BillingAddressCity
    • BillingAddressStreet
    • ...
Since I'm a newbie to the Salesforce SOAP programming I cannot explain it better.

Regards,
Gunnar Vogt (posting for Chris)
Kirill_YunussovKirill_Yunussov
Looks like it is caused by trying to write to non-writable fields.

I was getting this message when trying to update a list of Opportunity records.  Turned out that this was because I was updating the same object that I got from a query, and one (or more) of the queried fields on that object were not writable.   I think it was either "recordtype.name" or "amount".  What I ended up doing was creating a new instance of Opportunity object for update purposes.

1) Query for the Opportunity records, including related lists, and certain non-writable fields.
2) Instead of updating the objects you get from the query in Step# 1, create a NEW List of NEW Opportunities for update purposes, and only populate the fields that you want to update.
 
ArrayList<Opportunity> queryOpps = apiCaller.executeQuery(queryString);
    ArrayList<Opportunity> updateOpps = new ArrayList<Opportunity>();
    
    for (Opportunity queryOpp : queryOpps) {
        // some condition for update
        if (queryOpp.getAmount() < queryOpp.getProjected_Revenue__c()) {
    
            // create a new Opportunity, instead of adding the queryOpp to the update list 
            Opportunity updateOpp = new Opportunity();
            updateOpp.setId(queryOpp.getId());
            updateOpp.setStageName("Needs Review");
            updateOpps.add(updateOpp);
        }
    }
    
    apiCaller.update(updateOpps);

​





 
PSP 5PSP 5
I get this same error. {"Unable to find a deserializer for the type common.api.soap.wsdl.QueryResult Error Id: 392598695-71947 (663191964)"}

I get it when trying to update a custom field on our account object using c#. I just generated a fresh wsdl. 
The code is basically this where account is the SalesforceAccount and m_service is a reference to an instance of the SForceService generated from the wsdl
SaveResult[] saveResult = this.m_service.update(new SalesForce.WebService.sObject[] {account});