You need to sign in to do that
Don't have an account?
java.lang.IllegalArgumentException: array element type mismatch
sObjects=sfdc.retrieve(fieldList,"Lead",idArray);
An unexpected error has occurred.; nested exception is:
java.lang.IllegalArgumentException: array element type mismatch
2)using Query method
String fieldList="Id,Website_Unique_ID__c,ConvertedContactID,IsConverted";
String query1 = "Select "+fieldList+" from Lead where "+idList;
System.out.println(query1);
QueryResult qr=sfdc.query(query1);
Output:-
Select IsConverted from Lead where Id='00Q3000000E47VJEAZ' OR Id='00Q3000000E47V9EAJ' OR Id='00Q3000000E47VBEAZ' OR Id='00Q3000000E2Vs1EAF' OR Id='00Q3000000E47VZEAZ'
- Exception:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - type
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.enterprise.SoapBindingStub.query(SoapBindingStub.java:1656)
at brsfdc.BRSFDCDatabase.retrieveFromSFDC(BRSFDCDatabase.java:107)
at brsfdc.BRSFDCIntegrationProcess.main(BRSFDCIntegrationProcess.java:77)
An unexpected error has occurred.; nested exception is:
org.xml.sax.SAXException: Invalid element in com.sforce.soap.enterprise.sobject.SObject - type
Can u tell me how to verify the same
Following is the snippet which is used by me for setting Endpoint URL
BRSFDCConfiguration.C_SFDC_SERVERURL is https://www.salesforce.com/services/Soap/u/7.0
URL serverUrl = new URL(BRSFDCConfiguration.C_SFDC_SERVERURL);
sfdc = (SoapBindingStub) new SforceServiceCompressed().getSoap(serverUrl);
loginResult = sfdc.login(BRSFDCConfiguration.C_SFDC_USERNAME,BRSFDCConfiguration.C_SFDC_PASSWORD);
sfdc._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY,loginResult.getServerUrl());
I dont find anything wrong with the same pls suggest if i m wrong in abv snippet
The abv thing helped me and its working fine now
No the code reads as follows
URL serverUrl = new URL("https://www.salesforce.com/services/Soap/c/7.0");
this.sfdc = (SoapBindingStub) new SforceServiceCompressed().getSoap(serverUrl);
logMsgs.info("Attempting to connect "+serverUrl+".......");
this.loginResult = sfdc.login(
BRSFDCConfiguration.C_SFDC_USERNAME_STR,
BRSFDCConfiguration.C_SFDC_PASSWORD_STR);
Calendar cal = Calendar.getInstance();
this.loginTime_int=cal.get(Calendar.MILLISECOND );
this.sfdc._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY,this.loginResult.getServerUrl());