Displaying 20 results from an estimated 2000 matches similar to: "AWS and passing in a Model"
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 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 30
3
Arrays of objects as parameters to webservices
I think I am missing something terribly obvious. Is it possible to have
an :expects parameter for a webservice that is an array of objects? I
want to have a single webservice that expects all my line items (for an
order). Is this something that is possible?
--
Posted via http://www.ruby-forum.com/.
2005 Dec 30
5
AWS api_method :returns not accepting ActiveRecord::Base
I''m trying to use the feature of AWS where it will take an object derived
from ActiveRecord::Base instead of an AWS::Struct object. Whenever I try
it, though, I get the craziest error:
NoMethodError: You have a nil object when you didn''t expect it!
The error occured while evaluating nil.new
/usr/lib/.../actionwebservice/lib/action_web_service/casting.rb:105:in
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
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 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 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 02
1
SOAP client not seeing all of my AWS service methods
Hi all,
Ruby 1.8.4
Rails 1.1.2
I''m a newb when it comes to SOAP, but I thought I''d give it a shot. I
have several web services defined. However, when I try to connect with
a SOAP client it seems the client is only picking up one of the
services, called Hardware.
require ''soap/wsdlDriver''
wsdl_url =
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
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 22
14
currency conversion webservice in a rails app?
Hi,
I''m interested in using a currency conversion web service in my rails
app. Does anyone have a free service that they use and like? I found
this one
http://www.webservicex.net/WS/WSDetails.aspx?CATID=2&WSID=10
I''ve tried to make a simple, plain Ruby script to connect to this and
get a conversion rate without success.
How do I integrate a webservice into my rails app? I
2006 Jan 12
8
Synching between Sqlite and MySql
Hi folks,
I am running an offline Rails app that periodically connects to the
Internet to download the latest catalogue, and upload any new orders.
I am about to implement the synching bit - and was thinking whether
there is any other solution other than writing webservices and code to
do a manual sync of the data, or whether there is a more nifty and
robust way using say replication?
2006 Apr 21
8
web services and dealing with before_filter
Hi all,
I''ve got a Rails app with a ApplicationController that looks like this:
class ApplicationController < ActionController::Base
before_filter :authorize, :except => :login
def authorize
unless session[:user]
flash[:notice] = "Please log in"
session[:jumpto] = request.parameters
redirect_to :controller =>
2006 May 25
3
webservice timeout issue
I am having an issue where I am trying to test a weservice that I wrote by
connecting to it from ruby. When I submit my form that calls the webservice
it times out. you can see from the lighttpd log that the webservice
completes just after the timeout. any ideas? am I doing something wrong?
---- source ----
def validate
auth = ActionWebService::Client::Soap.new(AuthApi, "
2006 Jul 28
3
ActionWebService Struct member name including ''-''
Hi
I am tryng to mirror a locked away, secure web service for testing
purposes and am almost there. Hoever as part of the definition for the
structure of the call to the webservice, I have this struct.
class MyCall < ActionWebService::Struct
member :username, :string
member :password, :string
member :"remote-ip", :string
end
However this does not work... Should
2006 Jul 26
2
A Struct inside of a Struct
Hi...
I really need some help on something I am working on... I am trying to
create an XML-RPC webservice that sends the following as a response...
As you can see it looks like I can use a Struct with a boolean: member
but I don''t seem to be able to have another Struct as a member? Am I
barking up the wrong tree trying to do it this way? Should I try
something else?
I would really
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",
2007 Aug 17
1
Testing webservices in Integration Tests with Jamis Buck's recipe?
Hello,
I''m using Jamis Buck''s recipe to do integration tests on an
application, but I got a nil.recycle! error while doing a webservice
call.
This is the situation.
def test_uploading_data
invoke :upload, data
invoke :upload, even_more_data
real_user_session = new_session_as @real_user
real_user_session.press_magic_button_to_enable_more_uploads
invoke :upload,