• ejunkie2005
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
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
I am trying to obtain case information by customer and attempting to run the following query:
QueryResult qr = null;           
 binding.QueryOptionsValue = new sforce.QueryOptions();
 binding.QueryOptionsValue.batchSize = 500;
 binding.QueryOptionsValue.batchSizeSpecified = true;
 qr = binding.query("Select CaseNumber, CreatedDate, Subject from Case where SuppliedCompany = 'xyz'");

This returns no results. I've logged on to salesforce.com and verified that cases exist for the company.

Any suggestions will be much appreciated.

Thanks,
Prashanth

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 call the 7.0 api's query command, I get an exception.

There is an error in XML document (1, 519).
----> System.FormatException : String was not recognized as a valid DateTime.

The position number varies based on the query, but the exception flows out of sforce.query().

Any ideas on where to look?

The full exception is:


at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at GAPClientInfo.SForce.SforceService.query(String queryString) in C:\Documents and Settings\bwagstaff\My Documents\Visual Studio 2005\Projects\GAPClientInfo\GAPClientInfo\Web References\SForce\Reference.cs:line 678
at GAPClientInfo.GAPClientData.UpdateGeocodeCache(IDbConnection connection) in C:\Documents and Settings\bwagstaff\My Documents\Visual Studio 2005\Projects\GAPClientInfo\GAPClientInfo\GAPClientData.cs:line 106
at GAPClientInfo.GAPClientDataTests.CUpdateTest() in C:\Documents and Settings\bwagstaff\My Documents\Visual Studio 2005\Projects\GAPClientInfo\GAPClientInfo\GAPClientData.cs:line 147
--InvalidOperationException
at System.DateTimeParse.ParseExactMultiple(String s, String[] formats, DateTimeFormatInfo dtfi, DateTimeStyles style)
at System.DateTime.ParseExact(String s, String[] formats, IFormatProvider provider, DateTimeStyles style)
at System.Xml.XmlConvert.ToDateTime(String s, String[] formats)
at System.Xml.Serialization.XmlCustomFormatter.ToDateTime(String value, String[] formats)
at System.Xml.Serialization.XmlCustomFormatter.ToDate(String value)
at System.Xml.Serialization.XmlSerializationReader.ToDate(String value)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSforceService.Read38_NullableOfDateTime(Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSforceService.Read39_Contact(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSforceService.Read109_sObject(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSforceService.Read123_QueryResult(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderSforceService.Read157_queryResponse()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer57.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

Message Edited by Bryan Wagstaff on 01-19-2006 04:15 PM