Forum: Ruby on Rails How to access custom api from another app

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.
rph (Guest)
on 2007-02-15 05:00
I'm having some issues using action web service.  It seems as though I'm
doing something wrong, here.

I have an application that manages users.  Meaning it's one service that
validates logins, and holds all user information.  So I used the
'script/generate web_service' to build the UserApi, and tested it and
everything works fine.

So I go to use it in another application, include my 'web_client_api'
declaration at the top of my controller, and it doesn't work.  It
appears that I have to have a copy of the user_api.rb file in that
app/apis folder as well?!?!  That seems crazy to have to repeat that.
Isn't the point of web services to use functionality without having to
know much about it?

Also, if I want to return the User object from the api using :returns =>
[User], I'm told that my other application doesn't know if this class.
Does that mean that I have to duplicate the User class in every
application, too???

It seems like I'm doing something wrong, here.  I'm using xmlrpc if that

Any thoughts and/or suggestions???  Thanks a lot in advance.
This topic is locked and can not be replied to.