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
rodrigorrodrigor 

Webservice.Invoke not compilling in one org?

I am getting an Error "Method does not exist or incorrect signature"  when trying to compile a class generated by Apex2WSDL in one org. However, the exact same code compiles with no issues my SFDC Free Development Org. So I am assuming this could be a Sandbox refreshment issue? Maybe Webservice.invoke class library is not refreshed?

 

Would anybody have a clue why it works in one SFDC org and not on the other one? I have generated an Enterprise API wsdl from both orgs and they are both using version 28.0 but I am not sure if this is the same version as Webservice class?

 

Thanks in advance!

Vinita_SFDCVinita_SFDC

Hello,

 

I believe you are generating wsdl separately in both the orgs as Enterprise WSDL can not be used across the orgs, for using wsdl across the orgs it has to be a Partner WSDL. Please refer then section "Invoke Apex WSDL web services from Apex Code" in the following link and check if you are missing any step:

 

http://www.tgerm.com/2010/12/invoking-apex-wsdl-web-services-from.html

 

Hope this helps!

rodrigorrodrigor

Hi Vinita,

 

Thanks for your answer. The problem is not with the Enterprise WSDL, I was just generating the Enterprise WSDL on both orgs to compare which API each org is currently using and in my case they are the same 28.0.

 

The problem that I am facing is like a mistery to me. It happens when I create and Apex class from a 3rd party Web Service WSDL. It works fine in my Developer Org, also on another SFDC Unlimited Sandbox but it does not compile when I try to parse the wsdl, compile with this particular Enterprise SFDC Environment. I get the error:

 

Error: Method does not exist or incorrect signature: WebServiceCallout.invoke

 

Why would this Webservice.callout method compile on 2 distinct SFDC orgs but not on this one? And we have just refreshed this sandbox that is throwing the error today so I guess we can take the API version out of the question. Could this have to do with the SFDC Version being different?

 

Thanks,

Rodrigo