Ruby on Rails Monday, January 21, 2013

I just did a project that had to work with a .net SOAP API. I used the SAVON gem. There is also a RailsCast 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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
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.
 
 

No comments:

Post a Comment