+ Start a Discussion

sforce.apex.execute problem

I am calling a web service on click of a button through java script. I am passing a string parameter to the constructor. 'a' is of type String. Also output is of type List. How to capture that? Should i have to define an array?


gCamp -- Callout Class

gCamp -- Constructor






var accId="{!Account.Id}";

var a;


 But i am getting the following error:


A problem with onclick java script or button was encountered:

{faultcode:'soapenv:Client', faultstring: 'No operation available for request {http://soap.sforce.schemas/package/gCamp}gCamp, please check the WSDL for this service.',}


Any Ideas. Thanks.





Imran MohammedImran Mohammed

You are trying to invoke the constructor . That will not work.

Only methods defined as Webservice methods in the global class are allowed to be invoked using sforce.apex.execute.


Try to rename the gCampaignInfo and declare it as webservice method.

Then invoke that method.

If you need any help let me know