Ken
2006-Aug-28 15:00 UTC
Could anyone can tell me how to invoke the remote web service in rails?
In J2EE development, there are a lot of tools helping us to generate stubs using wsdl file. But in rails, it seems to me there is not the tool like that. So i have a problem: Does rails only need web service location to invoke web service? Do we need to configure somthing? For example: Api definition. Help me. Thanks. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Yan Pritzker
2006-Aug-28 15:43 UTC
Re: Could anyone can tell me how to invoke the remote web service in rails?
Hi Ken, Take a look at soap4r or the rails ActionWebService (http://wiki.rubyonrails.com/rails/pages/How+To+Consume+.NET+WebServices). If it''s doclit, soap4r and rails still don''t support that very well. If you''re trying to hit a complex doclit soap service and soap4r doesn''t help, try this: http://skwp.wordpress.com/2006/08/23/consuming-document-literal-soap-webservices-with-ruby-and-roxml -- Yan http://planyp.us http://skwp.wordpress.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
brabuhr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Aug-28 15:59 UTC
Re: Could anyone can tell me how to invoke the remote web service in rails?
On 8/28/06, Ken <kenDung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> In J2EE development, there are a lot of tools helping us to generate > stubs using wsdl file. But in rails, it seems to me there is not the > tool like that. So i have a problem: > > Does rails only need web service location to invoke web service? Do we > need to configure somthing?To invoke a remote web service from a Rails app, I use soap4r with wsdl2ruby to generate the client. Something like: > ruby wsdl2ruby.rb --wsdl ''path or url to WSDL'' --type client That should generate 3 files like: Client.rb default.rb defaultDriver.rb I like to rename them to be more descriptive than ''default'' like: NameOfService.rb NameOfServiceDriver.rb Then, either copy those files to app''s lib directory and symlink from the app''s model directory like: name_of_service.rb -> ../../lib/NameOfServiceDriver.rb Or, create a new model file that requires the driver and exposes appropriate methods. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---