I retrieve SObjects using retrieve() call from Metadata API and then I'm trying to parse them like described here in comment.

The problem occurs while trying to parse standard object Contract. It throws following:

com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'http://soap.sforce.com/2006/04/metadata:sorted' but found 'http://soap.sforce.com/2006/04/metadata:restrictedPicklist'

When I unzip received objects and drop line

< restrictedPicklist> true < / restrictedPicklist >

from Contract.object, it works fine.

So it looks like somewhere different API versions are used. But I checked everywhere - my endpoints, my generated jars, my force-wsc.jar - 33 is everywhere (and before I tried 32).

Am I missing something (I mean if I should define API Version somewhere else)?

Or is it their bug?

Or this SObject was created in older API Version and I can't solve that using the new one in that case?

Thank you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.