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
lloyd.powelllloyd.powell 

There is an error in XML document (1, 325).

Hi,

 

I'm using the API with vb.net. Calling binding.create() works fine, I have been creating custom objects etc. But I'm having issues with the query() function.

 

I'm sending a simple query through that should get an a property from one of my custom objects in salesforce. But I get the following error:

 

{"There is an error in XML document (1, 325)."}

 

{"The specified type was not recognized: name='QueryResult', namespace='urn:partner.soap.sforce.com', at <result xmlns='urn:enterprise.soap.sforce.com'>."}

 

The SOQL I'm sending seems fine so I was wondering if anyone else had stumbled across anything similar and if so, how it was resolved?

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

It would appear that you're mixing WSDLs and runtime URLs, if you're using the enterprise WSDL, make sure you're using the correct endpoint, /services/Soap/c/{someVersion}, if you're using the partner WSDL, make sure your requests are going to /services/Soap/u/{someVersion}.

All Answers

SuperfellSuperfell

It would appear that you're mixing WSDLs and runtime URLs, if you're using the enterprise WSDL, make sure you're using the correct endpoint, /services/Soap/c/{someVersion}, if you're using the partner WSDL, make sure your requests are going to /services/Soap/u/{someVersion}.

This was selected as the best answer
lloyd.powelllloyd.powell

Thanks for that.

 

I'm now getting this error!

 

{"Instance validation error: 'xsd:dateTime' is not a valid value for soapType."}

 

I've read about this before, will I have to go through the WSDL file and alter all the dateTimes to date or strings? Or is there a newer resolution since the articles I have read about?

 

Thanks

 

P.S. It's when I call:

 

binding.describeSObject(className)