0
votes

I am getting the method does not exist or incorrect error with this line:

partnerSoapSforceComWrapper.update_x(new List<Contact> (contacts));

The partnerSoapis defined below:

partnerSoapSforceCom.SaveResult[] update_x(sobjectPartnerSoapSforceCom.sObject_x[] sObjects);

Contact is an sObject; the same with contacts.

My question is: how can I resolve this issue?

2

2 Answers

1
votes

Either partnerSoapSforceComWrapper on your first line is not the correct variable name, or it doesn't have a method signature update_x(List <Contact>).

Where is partnerSoapSforceComWrapper defined? If you post more code I could give a more definitive answer. Hopefully the above helps you find the problem.

1
votes

Assuming this is in Apex, List<Contact> will be a reference to the built in Contact type, and not the Contact type you imported from the WSDL, and so its not a descendent of the sObject_x type. But once you've gotten that sorted out, I expect you'll be further stuck because wsdl2apex does not support the xsd:any element used by the partner WSDL, so once you get it to compile, you won't be able to do anything useful.

You probably should be looking at the salesforce 2 salesforce feature to copy data between different org's in salesforce (which is a guess at what you're trying to do).