Problem in webservice

I have created a webservice named annonce (there is its code )
class AnnonceApi < ActionWebService::API::Base
api_method :find_all_annonces,
:returns => [[:int]]

and its controller has been declared in this way:

class BackendController < ApplicationController
require ‘annonce_api’

wsdl_service_name ‘Backend’
web_service_api AnnonceApi
web_service_scaffold :invoke

def find_all_annonces
Annonce.find(:all).map{ |annonce| }

when I try to test the invoke It work
but when a client try to access to this webservice , he receives 2
kinds of errors

the first
---- uninitialized constant ClientController::AnnonceApi
when I use such method

opts = {}
client =, ‘http://
localhost:3009/backend/api’,:namespace=> “AnnonceApi”, :driver_options
=> opts)

def list
@annonces = client.find_all_annonces
the second error
----- Missing API definition file in apis/annonce_api.rb

when using the other method
web_client_api :annonce,:soap,“http://localhost:3009/backend/api

def list
@annonces = client.find_all_annonces

I need your help as soon as possible , because I am preparing a
project of my end studies , and I still have just a week to end its
so please if someone can answer me in this few days