sarvesh kushwaha
2013-Jan-21 05:48 UTC
How to consume Asp.net web service in ruby on rails
Guys i m new to Ruby on rails , Task - i m trying to consume a webservice in ruby on rails and this web service is made in asp.net . my controller code is through which i m trying to consume webservice is - class WebserviceController < ApplicationController def getMsg hello_client = ActionWebService::Client::Soap.new(HelloWorld, "http://localhost:50739/WebService/RubyConsumeIt.asmx/HelloWorld") @service_output= hello_client.getMsg(params[:name]) end end and this is my controller view - <html> <head> <title>Hello Web Service</title> </head> <body> <h1>Hello Web Service </h1> <p> </p> <p> <%= @service_output %> </p> </body> </html> and i m getting an error - uninitialized constant ActionWebService please help , if there is any sample code to consume asp.net webservice in ruby on rails . it will be much appreciated. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Monday, 21 January 2013 00:48:41 UTC-5, Ruby-Forum.com User wrote:> > Guys i m new to Ruby on rails , > Task - i m trying to consume a webservice in ruby on rails and this web > service is made in asp.net . > > my controller code is through which i m trying to consume webservice is > - > > class WebserviceController < ApplicationController > > def getMsg > > hello_client = ActionWebService::Client::Soap.new(HelloWorld, > "http://localhost:50739/WebService/RubyConsumeIt.asmx/HelloWorld") > >ActionWebService was dropped from Rails back in Rails 2 (about 5 years ago). There are some forks still active: https://github.com/datanoise/actionwebservice but it''s mostly unmaintained. You may want another, more active, SOAP library: https://www.ruby-toolbox.com/categories/soap You''ll also definitely want to find better documentation, as whatever steered you towards ActionWebService is *wildly* out-of-date. --Matt Jones -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/JDb9FdoqlegJ. For more options, visit https://groups.google.com/groups/opt_out.
Frederick Cheung
2013-Jan-21 15:22 UTC
Re: How to consume Asp.net web service in ruby on rails
On Monday, January 21, 2013 2:58:01 PM UTC, Matt Jones wrote:> > > ActionWebService was dropped from Rails back in Rails 2 (about 5 years > ago). There are some forks still active: > > https://github.com/datanoise/actionwebservice > > but it''s mostly unmaintained. You may want another, more active, SOAP > library: > > https://www.ruby-toolbox.com/categories/soap > >Of those I''ve found savon to be very easy to use (and the relatively recent savon 2 is even better) Fred> You''ll also definitely want to find better documentation, as whatever > steered you towards ActionWebService is *wildly* out-of-date. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/uvqF7TibyWUJ. For more options, visit https://groups.google.com/groups/opt_out.
Curtis Ovard
2013-Jan-21 15:32 UTC
Re: How to consume Asp.net web service in ruby on rails
I just did a project that had to work with a .net SOAP API. I used the SAVON<http://savonrb.com> gem. There is also a RailsCast<http://railscasts.com/episodes/290-soap-with-savon>from Ryan Bates that shows this in action too. Hope this helps. On Sunday, January 20, 2013 10:48:41 PM UTC-7, Ruby-Forum.com User wrote:> > Guys i m new to Ruby on rails , > Task - i m trying to consume a webservice in ruby on rails and this web > service is made in asp.net . > > my controller code is through which i m trying to consume webservice is > - > > class WebserviceController < ApplicationController > > def getMsg > > hello_client = ActionWebService::Client::Soap.new(HelloWorld, > "http://localhost:50739/WebService/RubyConsumeIt.asmx/HelloWorld") > > @service_output= hello_client.getMsg(params[:name]) > > end > > end > > > and this is my controller view - > > <html> > <head> > <title>Hello Web Service</title> > </head> > <body> > <h1>Hello Web Service </h1> > <p> > > </p> > <p> > <%= @service_output %> > </p> > </body> > </html> > > > > and i m getting an error - > > uninitialized constant ActionWebService > > > please help , if there is any sample code to consume asp.net webservice > in > ruby on rails . it will be much appreciated. > > -- > Posted via http://www.ruby-forum.com/. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/J3g8XLYEglEJ. For more options, visit https://groups.google.com/groups/opt_out.
Jordon Bedwell
2013-Jan-21 15:35 UTC
Re: Re: How to consume Asp.net web service in ruby on rails
On Mon, Jan 21, 2013 at 9:22 AM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Of those I''ve found savon to be very easy to use (and the relatively recent > savon 2 is even better)Couldn''t agree more, when I absolutely must work with SOAP I use Savon. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.