Forum: Ruby on Rails Problem in webservice

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
7dcb169c7c52821371671dfa0c36a90a?d=identicon&s=25 (Guest)
on 2007-06-18 19:44
(Received via mailing list)
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

This topic is locked and can not be replied to.