You need to sign in to do that
Don't have an account?
ejunkie2005
Querying for CreatedDate results in "There is an eror in XML Document" error
I am using C# to obtain case data from Salesforce in my application. I dont have any problems querying the rest of the case-related information.
When I run the following query:
QueryResult qr = binding.query("Select CreatedDate from Case where CaseNumber = '00003511'");
The following exception is thrown:
Message: There is an error in XML document (1, 477).
Trace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlRea
der, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, St
ring encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie
ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal
l)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
ame, Object[] parameters)
at SFIncidentCaseData.sforce.SforceService.query(String queryString) in <path to project>\Web References\sforce\Reference.cs:line 678
at SFIncidentCaseData.Program.GetIncidentCaseData(String strOrgName, String s
trStartCreatedDate, String strEndCreatedDate) in <path to source file>:line 62
Any help is appreciated!
Thanks,
Prashanth
When I run the following query:
QueryResult qr = binding.query("Select CreatedDate from Case where CaseNumber = '00003511'");
The following exception is thrown:
Message: There is an error in XML document (1, 477).
Trace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlRea
der, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, St
ring encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie
ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal
l)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN
ame, Object[] parameters)
at SFIncidentCaseData.sforce.SforceService.query(String queryString) in <path to project>\Web References\sforce\Reference.cs:line 678
at SFIncidentCaseData.Program.GetIncidentCaseData(String strOrgName, String s
trStartCreatedDate, String strEndCreatedDate) in <path to source file>:line 62
Any help is appreciated!
Thanks,
Prashanth
Would you please point me to some? I didnt find anyting relevant.
Thanks,
Prashanth
Thanks,
~p
I managed to get this working finally (cheap approach) by removing anything unwanted from the .wsdl file. I think it's the size of the .wsdl file that messes it up.
Example,
Any part that I don't need now looks like the following
<xsd:complexType name="ActivityHistory">
<xsd:complexContent mixed="false">
<xsd:extension base="ens:sObject">
<xsd:sequence />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
BTW, Salesforce should add this as a feature to their .wsdl generator tool where you can select only the elements(sections) that you use.
Maz.
https://www.salesforce.com/services/Soap/c/7.0
to
https://www.salesforce.com/services/Soap/c/8.0 in my web.config. It stopped working.
Any help would be greatly appreciated.
Thanks
Maz.
http://community.salesforce.com/sforce/board/message?board.id=NET_development&message.id=4069
Thanks.. that worked.
http://support.microsoft.com/kb/925272
Maz.