I am writting a web service for authenitcation of users and was using web_service_scaffold :invoke for testing it out...and was able to consume it using .NET. But my question is, whats the simplest method using which i can use the same web service in the current Web App. I mean, not from an external application or something but from the current web apps itself. I found one method in AWDR, and was: class MyController < ApplicationController web_client_api :product, :soap, "http://my.app.com/backend/api" def list @products = product.find_all_products.map do |id| product.find_product_by_id(id) end end end but this is again like invoking the service from outside..
Why not to move all your web service methods to derivative of ActionWebService::Base and just instantiate an object of this class. On 4/10/06, hemant kumar <gethemant@gmail.com> wrote:> I am writting a web service for authenitcation of users and was using > web_service_scaffold :invoke for testing it out...and was able to consume it > using .NET. But my question is, whats the simplest method using which i can > use the same web service in the current Web App. I mean, not from an external > application or something but from the current web apps itself. > > I found one method in AWDR, and was: > > class MyController < ApplicationController > web_client_api :product, > :soap, > "http://my.app.com/backend/api" > def list > @products = product.find_all_products.map do |id| > product.find_product_by_id(id) > end > end > end > > but this is again like invoking the service from outside.. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Kent --- http://www.datanoise.com
Thanx i would try that out On Monday 10 April 2006 10:55 pm, Kent Sibilev wrote:> Why not to move all your web service methods to derivative of > ActionWebService::Base and just instantiate an object of this class. > > On 4/10/06, hemant kumar <gethemant@gmail.com> wrote: > > I am writting a web service for authenitcation of users and was using > > web_service_scaffold :invoke for testing it out...and was able to consume > > it using .NET. But my question is, whats the simplest method using which > > i can use the same web service in the current Web App. I mean, not from > > an external application or something but from the current web apps > > itself. > > > > I found one method in AWDR, and was: > > > > class MyController < ApplicationController > > web_client_api :product, > > > > :soap, > > > > "http://my.app.com/backend/api" > > def list > > @products = product.find_all_products.map do |id| > > product.find_product_by_id(id) > > end > > end > > end > > > > but this is again like invoking the service from outside.. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > -- > Kent > --- > http://www.datanoise.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails