You need to sign in to do that
Don't have an account?
Kirill_Yunussov
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - Name
For some reason I cannot query any fields other than ID via API for a few recently created custom objects. I am using Entersprise WSDL, and a simple query of "select id, name from my_custom_object__c".
The result is this error: org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - Name
If I try to pull only the ID, then there are no issues.
I have checked the permissions for this new object, and there seems to be no problems there - visible to all.
All Answers
Agree with Kirill, something must have just recently changed in SFDC. If I create a new custom object, consume the new wsdl using wsdl2java then query any field other than the ID, I get the same error.
However, querying older, existing, custom objects, everything still works.
We have resolved this issue, although it's still not very clear what the root cause was. As it turned out, there was an error in the WSDL that we generated via wsdl2java. wsdl2java was timing out half way through its process, and creating an incomplete WSDL while not showing an error. To fix the timeout issue, we added "-O -1" flag to the command line invocation (batch file), which disables the timeouts.