Displaying 20 results from an estimated 1000 matches similar to: "Including common code among multiple web services issue?"
2006 Jan 06
6
AWS and array of Model
Hi!
I try to use a layered webservice and I want to get back an array of users;
In the API I use:
api_method :listUsers,:returns=>[[User]]
in the service:
def listUsers
User.find(:all)
end
Result in soap mode:
Don''t know how to cast TrueClass to Object
Result in XML-RPC mode:
You have a nil object when you didn''t expect it!
You might have expected
2006 Jan 04
5
Webservice External XMLRPC
Hello i have some trouble getting my webservice to run .
I have the following webservice :
class DirectSpoolAPI < ActionWebService::API::Base
api_method :add, :expects => [{:html=>:string},{:from=>:string}],
:returns => [Customer]
end
class DirectSpoolService < ActionWebService::Base
web_service_api DirectSpoolAPI
def add(html,from)
Customer.find(:first)
end
2006 Nov 04
1
layere dispatching - please help!
Hi Folks,
I''m having trouble with setting up web services with layered
dispatching.
I''ve defined my controller (backend_controller.rb) as:
class BackendController < ApplicationController
web_service_dispatching_mode :layered
web_service_scaffold :invoke
web_service (:car) {CarService.new}
end
and my service (node_service.rb) as:
2006 Jan 31
0
webservice problem (cant make client)
hey, i have made a webservice
http://twodecode.pilot.localhost.be:3000/backend/wsdl
here i can see the wsdl file
i have a method string Authenticate(string twa, string login, string pass)
when i do /invoke i can test it, this all works
backend_api.rb
class BackendApi < ActionWebService::API::Base
api_method :authenticate,
:expects => [{:twa =>:string},{:login
2006 Feb 20
3
Trouble connecting to a Rails SOAP web service with a simple Ruby client
Hi,
The code for my Rails webservice is below. It working just fine
through the Rails web service scaffold invoke
http://localhost:3000/ProductBackend/invoke
I''m trying to write a plain ruby command line client to access the webservice.
require ''soap/rpc/driver''
proxy = SOAP::RPC::Driver.new("http://localhost:3000/product_backend",
2009 Aug 25
5
uninitialized constant
API-> hello_message_api.rb.
class HelloMessageApi < ActionWebService::API::Base
api_method :hello_message, :expects => [{:firstname=>:string},
{:lastname=>:string}], :returns => [:string]
end
controller ->
class HelloMessageController < ApplicationController
web_service_api HelloMessageApi
web_service_dispatching_mode :direct
wsdl_service_name
2010 Nov 02
0
webservice - get client ip address
Hi
I have the following problem in my application I have
in the controller:
class XmlrpcController < ApplicationController
web_service_dispatching_mode :layered
wsdl_service_name ''weblogUpdates.ping''
web_service_scaffold :invoke
web_service :weblogUpdates, WeblogUpdates.new
end
in the api definition file:
-------
class WeblogUpdatesApi <
2008 May 07
1
uninitialized constant HelloadminController::HelloApi
I have built up a simple allication for web service interaction. But the
following error message occured:
uninitialized constant HelloadminController::HelloApi
service api
class HelloApi < ActionWebService::API::Base
api_method :getMsg, :expects => [:name=>:string], :returns =>
[:string]
end
service controller
class HelloController < ApplicationController
2005 May 31
2
Rails Web Services
This deals with the Rails book, but ActionWebService in general.
I''m having trouble getting the Rails book''s example in the Web Service
chapter working. Everything else works (all the ''depot'' site features up
to that point have been built and work). I don''t think it''s an issue
with the book code being wrong, because the ActionWebService API
2006 Sep 11
5
WebServices & controllers
Hi,
I am having problems with REST web-service support.
I have a simple controller:
class DocumentsController < ApplicationController
wsdl_service_name ''Documents''
web_service_api DocumentsApi
web_service_scaffold :invoke
def list
@docs = Document.find(:all)
respond_to do |wants|
wants.html
wants.xml { return @docs .to_xml }
end
end
end
2007 Jan 18
2
How to use API from AWS -- help!
I''m building a users web service (direct dispatching) that will (I hope)
allow several other applications to manage the same pool of users. Plus
it will act as a single-sign-on solution for what I''m doing. But I''m
having difficulty accessing the UserAPI. Here''s what I''ve done so far:
$> rails usermanagement
- "usermanagement" is the
2006 Mar 02
1
web serveces problem
Hi,
I''m trying to added layered web services to my application and from some
reason it''s not working for me. i''m working with ruby 1.84, rails 1.0.
here are my files:
1. app/apis/kate_api.rb:
class KateAPI < ActionWebService::API::Base
inflect_names false
api_method :check_version, :expects => [:string], :returns => [:string]
end
2.
2006 Jan 20
2
AWS and passing in a Model
Hi,
I have a webservice. And I want to pass in, a model.
So, for example:
api_method :save_person, :expects => [Person]
When I do this I get an error saying that I cannot have ActiveRecord
objects as parameters. Fine. I can have AWS Structs as parameters. I
don''t want to start ''maintaining'' a struct everytime I change the table
structure od Persons.
So, is
2006 Jan 11
1
HELP!! - ActiveRecord derivates in AWS :expects method
Hi,
I have a strange problem while using WebService API which expects an
ActiveRecord derivate.
This is the code of the API ...
------
class HarvesterApi < ActionWebService::API::Base
api_method :send_measurand,
:expects => [{:measurand => Measurand}, {:eaiSystemName =>
:string}]
end
------
... and this of my Model
------
class Measurand < ActiveRecord::Base
2006 May 17
6
Problem Consuming a Web Service
I''m trying to consume a webservice from my rails application and have
discovered an interesting problem. I can call webservice functions
just fine, as long as they do not require any arguments, but function
that do require arguments do not work. The arguments are sent as
either null or an empty string.
My API has these method definitions:
api_method :otherFunction,
2006 Jan 26
1
Webservices and submitting object with associations
Hi - is there an easy way to submit an object with its associations as
an :expects parameter to a AWS webservice?
I know I could first create a webservice method for the object, and then
call - in a loop - another webservice for each of my association
objects.
Is there an easier more elegant way, so that I don''t have to make so
many expensive webservice calls?
I was thinking
2006 May 14
0
Invoke .Net WebService error in RoR
I have written a webservice:
----------- Service.cs ----------------
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld(string name)
2006 Jul 24
1
XMLRPC WebService and Structs
Hi
First off, I apologise if this is covered somewhere and I just don''t
get it... I''ve looked far and wide ....
As a part of my current project I need to hook up to a particular
XMLRPC webservice that won''t be available for me to use until close
to launch date... So I am trying to recreate the webservice that
mirrors the live one so I can test my application
2006 Jan 05
3
ActiveRecord model classes not allowed in :expects
Hi,
I have a strange problem while using WebService API which expects an
ActiveRecord derivate.
This is the code of the API ...
------
class HarvesterApi < ActionWebService::API::Base
api_method :send_measurand,
:expects => [{:measurand => Measurand}, {:eaiSystemName =>
:string}]
end
------
... and this of my Model
------
class Measurand < ActiveRecord::Base
2006 Jul 31
5
ActionWebService API
Hi *,
I need to pass a hash to a webservice, so I defined my API with:
api_method :search,
:expects => [{
:tags => :string,
:assignment => :string,
:resource => :string,
:lesson_plan => :string,
:subject => :string,
:all_types => :string
}], :returns => [[Resource]]
when I try to test the webservice with scaffold the