+ Start a Discussion
EllenHEllenH 

Webservice with @future - No operation available for request.... error

Looked and looked online, in communites and through my cookbook and cannot seem to figure it out - so hoping the collective community can help find the error.

 

I have a custom button that is calling an apex class.  I get the dreaded "fault code....etc.  No operation available for request, etc...  please check the WSDL for the service."

 

My understanding of this error is that the apex code being called is not declared as a webservice.  However in my case it is, but with @future.  

 

Here is the code in the button:

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}

if (
 (
// System Administrator
 ("{!$User.ProfileId}" == "00e30000000e1mu") ||
// Order Management
 ("{!$User.ProfileId}" == "00e30000000i5Km")
 ) && "{!Opportunity.Probability}" >= .75 ) {

var oppID = '{!Opportunity.Id}';
var man = true;

sforce.apex.execute("oppClose","createCase",{oppID: oppID, man: true});

location.reload();

}

else

{
alert("Only Authorized Users can manually trigger the creation of all necessary //Cases for Implementation and only from a Closed Won Opportunity");
}

 


Here is the snippet of code from the apex class that is being called where the webservice is defined:

 

global class OppClose {
    public static String koAmericanPrnCaseId;
    public static String koBeehiveCaseId;
    public static String koHarcourtCaseId;
    public static String koJohnsonCaseId;
    public static String koRidgwaysCaseId;
    public static String koMondoCaseId;
    public static ID cntct;
    public static Integer count;
    public static ID impCase;
    public static ID pbeID;
    @future
    webService static void createCase(ID oppID, Boolean man){
      
       List<Opportunity> oppList =
        [select o.AssdImpCase__c, .....  etc.

 

 

SurpriseSurprise

I am just commenting after reading few lines.No operations means no method is available

EllenHEllenH

the full error is:

 

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

 

Not sure what that means when you say no method available.  I do have a test method within the class.  Is that what you are referring to.

 

Thx.