moudden.mehdi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jun-18  17:43 UTC
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| annonce.id }
  end
end
when I try to test the invoke It work http://localhost:3009/backend/invoke
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 = ActionWebService::Client::Soap.new(AnnonceApi, ''http://
localhost:3009/backend/api'',:namespace=> "AnnonceApi",
:driver_options
=> opts)
  def list
    @annonces = client.find_all_annonces
  end
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
  end
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
thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---