Need to Create Soap Web Service in Rails 3.2

Hi All,

I want to create an application which needs to provide SOAP services to multiple applications, I have googled and found that no plugins/gem were available to create soap web services except the wash_out gem for Rails 3. Also I am not sure whether it is good to go with the wash_out gem, and I don’t want waste my time to do more R&D on this.

If Rails is not supporting Soap web Services, please give me some suggestions to make it happen, because there is no way for me to go for other frameworks, since my application was already implemented on Rails 3.2 with more functionality.

regards,
Loganathan
ViewMe

Once I’ve heard of this

http://savonrb.com/

there’s also a railscast about it

HTH

Javier Q.

Thanks Javier, Looks like the Savon is only to consume SOAP service, but I want to create SOAP Service for other application to use (i.e Need to create SOAP Server for Clients)

regards,
Loganathan
ViewMe

I am a fan of

https://github.com/typhoeus/typhoeus

And writing custom XML builders wiith Nokogiri

The combination is what would you do by using Curl and XML files from the command line

At the first level of abstraction, SOAP is just fancy XML, and so you can just use the XML rendering stuff, maybe in conjunction with ERB, and parse it with Nokogiri and friends.

That said, when I hear someone talk about ‘SOAP web services’, they usually mean some part of the whole set of standards layered on top of it: WSDL, WS-Security, SAML, and so forth, in some combination. So you may need to clarify requirements with your customer here - how much SOAP do they really want, why do they want a SOAP API instead of a more modern, simpler, but perhaps less buzzwordy REST API, etc.

If they really want all the above, and you can’t find good Ruby implementations to use, you may be faced with building a translation layer in Java or .NET. Expose a REST API from your Rails code, have your Java or .NET code consume it and expose it as SOAP. Not ideal, but probably better than trying to implement the SOAP standards stack in Ruby.

-David

There is the soap4r gem which I have not used, but I have used this:

https://github.com/spox/soap4r-spox

and it has been fantastic in consuming wsdl for me,

you can follow this link to create soap server:

http://www.tutorialspoint.com/ruby/ruby_web_services.htm

I do hope this helps