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
CaffeineCaffeine 

Using the Bulk API and the original API in one program

I'm trying to write a program that pulls data from SFDC, processes it and then pushes data back.  I wanted to use the Bulk API to do the pushes back, but have been stumped by a strange problem:

 

1. Using the Partner WSDL, the first part of the program where the data is pulled from SFDC and processed works fine.

 

2. I created a totally separate Java project to do the Bulk API piece using the wsc-18.jar and partner-18.jar from the Bulk API Google site.

 

3. I built the Bulk piece totally separately.

 

4. I put the compiled custom Bulk jar into my first project.

 

5.  After that, the original project starts spewing errors like this:

 

ERROR main org.apache.axis.client.Call - Exception:
norg.xml.sax.SAXException: Invalid element in com.sforce.soap.partner.sobject.SObject - Id
        at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
        at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
        at org.apache.axis.client.Call.invoke(Call.java:2467)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at com.sforce.soap.partner.SoapBindingStub.query(SoapBindingStub.java:3274)

ERROR main org.apache.axis.client.Call - Exception:norg.xml.sax.SAXException: Invalid element in com.sforce.soap.partner.sobject.SObject - Id        at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)        at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)        at org.apache.axis.client.Call.invoke(Call.java:2467)        at org.apache.axis.client.Call.invoke(Call.java:2366)        at org.apache.axis.client.Call.invoke(Call.java:1812)        at com.sforce.soap.partner.SoapBindingStub.query(SoapBindingStub.java:3274)

 

 

The original project is using version 18 or the Partner WSDL and, from my reading, the above error is seen frequently when you try to send an Enterprise WSDL request to a Partner end-point or vice-versa, but that's not the case here.

 

Any ideas?

 

Thanks.