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
eyeSeaeyeSea 

Query Case.CreatedDate Causes XML Error

So I've been trying to query the Case table for some data but for some strange reason when I add the field CreatedDate I get this odd error response: 'There is an error in XML document (1, 643).'

Here is the excerpt from my application log:
2006-11-07_07:15:22,[login] Begin
2006-11-07_07:15:22,[login] SessionID: QVHqo6ruXq9kcfcDlmhwvHJG49Se.kbDY7.TZS3gNOEvbq36HJoNxvhZcfpNwnzNk6L3jGyHnCfap_58z3RM0GpYnKO9AsNCSeX5jsUoLXQ=
2006-11-07_07:15:22,[login] ServerURL: https://na3-api.salesforce.com/services/Soap/c/7.0
2006-11-07_07:15:22,[login] Complete
2006-11-07_07:15:22,[getQuery] Executing query: 'Select CaseNumber, ClosedDate, ContactId, CreatedById, Description, Id, Origin, OwnerId, Priority, Self_Service_Portal_User__c, Status, Subject from Case where Self_Service_Portal_User__c = 'user@somesite.com''
2006-11-07_07:15:22,[getQuery] 1 found
2006-11-07_07:15:22,[getQuery] Done
2006-11-07_07:15:26,[login] Begin
2006-11-07_07:15:27,[login] SessionID: Y8MggXF9QD49D68qKtD.7q8El7QSc2ZlZd31dbmmzlydLUVo0qrWSXFcKZByV8kVl5BzpVc5fh7P2f1AIKZTOWpYnKO9AsNCSeX5jsUoLXQ=
2006-11-07_07:15:27,[login] ServerURL: https://na3-api.salesforce.com/services/Soap/c/7.0
2006-11-07_07:15:27,[login] Complete
2006-11-07_07:15:27,[getQuery] Executing query: 'Select CaseNumber, ClosedDate, ContactId, CreatedById, CreatedDate, Description, Id, Origin, OwnerId, Priority, Self_Service_Portal_User__c, Status, Subject from Case where Self_Service_Portal_User__c = 'user@somesite.com''
2006-11-07_07:15:27,ERROR getQuery(): There is an error in XML document (1, 643).

As you can notice there are 2 queries - one without the CreateDate field and the last with the CreatedDate field. With the CreatedDate field I get that error.. any insights?

Message Edited by eyeSea on 11-07-2006 07:19 AM

eyeSeaeyeSea
I can't seem to get the KB so I went into the WSDL myself and didn't see what I was supposed to edit as the type already == "xsd:dateTime". Any more insights or support? Thanks!

            <complexType name="Case">
                <complexContent>
                    <extension base="ens:sObject">
                        <sequence>
                        <element name="AssignmentNumber__c" nillable="true" minOccurs="0" type="xsd:string"/>
                        <element name="CaseNumber" nillable="true" minOccurs="0" type="xsd:string"/>
                        <element name="ClosedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
                        <element name="ContactId" nillable="true" minOccurs="0" type="tns:ID"/>
                        <element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
                        <element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>

Message Edited by eyeSea on 11-07-2006 01:42 PM

SuperfellSuperfell
There are other fields in the wsdl that are xsd:date, you need to remove these element declarations (as the workaround). The only way to get the hotfix right now is to call Microsoft PSS