You need to sign in to do that
Don't have an account?
wsp63002
"Invalid element in com.sforce.soap.enterprise.sobject.Account - Active__c"
I'm seeing the following errors from trying to do an Account lookup...can someone help me to understand the issue of Invalid Element? Thanks. -abe
-------
[2005-10-19 07:53:44,527] INFO Connecting to Salesforce.com Web Services API using account xxxxxxxxxxx
[2005-10-19 07:53:54,621] INFO Session Obtained is xxxxxxxx
[2005-10-19 07:53:56,558] ERROR Exception:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.Account - Active__c
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:260)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at org.apache.axis.client.Call.invoke(Call.java:2343)
at org.apache.axis.client.Call.invoke(Call.java:2240)
at org.apache.axis.client.Call.invoke(Call.java:1755)
at com.sforce.soap.enterprise.SoapBindingStub.search(SoapBindingStub.java:1814)
at com.rndc.AccountLoader.find(AccountLoader.java:40)
at com.rndc.AccountLoader.main(AccountLoader.java:101)
[2005-10-19 07:53:56,558] FATAL ; nested exception is:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.Account - Active__c
[2005-10-19 07:53:56,558] FATAL
-------
[2005-10-19 07:53:44,527] INFO Connecting to Salesforce.com Web Services API using account xxxxxxxxxxx
[2005-10-19 07:53:54,621] INFO Session Obtained is xxxxxxxx
[2005-10-19 07:53:56,558] ERROR Exception:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.Account - Active__c
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:260)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at org.apache.axis.client.Call.invoke(Call.java:2343)
at org.apache.axis.client.Call.invoke(Call.java:2240)
at org.apache.axis.client.Call.invoke(Call.java:1755)
at com.sforce.soap.enterprise.SoapBindingStub.search(SoapBindingStub.java:1814)
at com.rndc.AccountLoader.find(AccountLoader.java:40)
at com.rndc.AccountLoader.main(AccountLoader.java:101)
[2005-10-19 07:53:56,558] FATAL ; nested exception is:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.Account - Active__c
[2005-10-19 07:53:56,558] FATAL
If you're using the enterprise WSDL, you need to use fixed sets of fields, not dynamicly from the describes, otherwise you'll continue to run into this problem.
This error indicates that your Salesforce client cannot recognize the SObject type, so it's not able to interpret any of that SObject's fields other than ID.
To resolve - not only do you need to import the new object's definition into your WSDL, you also need to update the qName section of your com.sforce.soap.enterprise.SoapBindingStub class to reference this new SObject type. Looks something like this:
If you don't update SoapBindingStub class - you will still be able to query the new SObject, but no fields except the ID field. For any other fields, you will get the following error:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - Custom_Field__c