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
ManForceManForce 

Can't able to call Apex web service from flex

i am creating Apex service:

 

global class CreditCardProviderService {
    webservice static String fetchCreditCardProviders() {
       
              
       String s='Federal';
       
             return s;     
  }
         
    }

 

and i am calling from flex like this

 

 

    public function cobrandlogin(lr:Object):void
            {
                var keywords: String="value";
                // var results:String=null;     
                
                var object:Parameter=new Parameter("keywords",keywords);
            
                var params:Array=[object];
                   
                var tempCallBack:AsyncResponder = new AsyncResponder(resultHandler,faultHandler);
                    
                      dmeModel.apex.execute("CreditCardProviderService","fetchCreditCardProviders",params,tempCallBack);
                   
             
             }
            
                
          public function resultHandler(result:Object):void
            {
                 Alert.show("Enter");
                  Alert.show(result.toString());
                  if (result != null)
                  {
                          Alert.show(result.toString());
                  }
                  else
                  {
                       Alert.show("Result is empty.", "Info");
                  }
          }
            public function faultHandler(result: Fault):void
             {
                        Alert.show("Operation failed", "Error");
                       
              }

 

but i am not getting the result

I want to just return a single value.

its not returning the result  in flex, Its showing "fault object" that is" operation failed";

 please help to solve this ..