Soap based web services using ruby on rails framework - ruby-on-rails

Is it possible to write soap based web services using ruby on rails framework. If yes, can someone please point to a learning resource

Yes, you can write SOAP web services using Rails, However Rails is moving in favour of a REST web service approach. So my personal opinion is if you are starting a brand new Rails app with SOAP web services, consider some other programming language like JAVA, because that has more tools to easily create SOAP web services.
But nowadays all the webservices going towards REST, because of the simplicity it has. Almost all major sites has a REST API.
Furthermore if you are still planning to go ahead with Rails, savon is an interesting gem that you should probably look at.

Related

Web Service and Endpoints in Rails

I am new to Rails and I am creating a RoR web application, their is a mobile component that will connect (CRUD) to the default db I am creating. I need some guidance in writing the web service component and what valid endpoints should look like in this type of app. Any direction would be helpful, thanks.
Ruby on Rails provides restful web service development out of the box, i.e. any app developed on RoR is by nature a RESTful web service. To answer the specifics of your question, consider checking out this SO thread

Developing oAUTH service in OpenEdge WebSpeed

I'm developing a new website which is going to include web API. What I want to know is how easy (or hard) is it to develop the server side oAUTH service into my new website?
I'm using OE11.0 WebSpeed in combination with Apache. Because I'be been doing Progress/OpenEdge 4GL/ABL development for over 10 years and nothing else I find very hard to translate existing code like, PHP, Python, Java etc.
I've read the RFC related to oAUTH and I find my self get lost in "key-varner".
Has anybody develop a oAUTH server side code in OpenEdge WebSpeed? If so, are you willing to share?
The CLR bridge works in OE 11 onwards now and we use .NET dll's in webspeed sucessfully.
I think your best bet is to do this outside of Webspeed / ABL, otherwise you are stuck re-inventing the wheel. The easiest solution would be to call a .NET library directly from your ABL code but I think that the CLR bridge doesn't work for Webspeed / Appserver apps.
One solution is to have a separate, non-Webspeed app just to handle these oAUTH requests, using a ProxyPass directive on your Apache server to pattern match the URIs and route the requests to the appropriate app.
You could use any non-Webspeed tech. you want, but since I know Ruby best, I will point out the excellent omniauth gem, which supports arbitrary authentication strategies, including oAUTH. You can create a custom gem for your specific provider by working off of any of these strategies (see the "Notes" section and look at any of them that cite "OAuth API" or "OAuth 2 API").
If you want to go whole hog and write the entire app in a different language (yet still using an OpenEdge database), I will toot my own horn and point out the Ruby adapter for OpenEdge databases. This would allow you to use the Ruby on Rails framework for your Web app.

Microsoft Analysis Services - Interact with Rails ActiveRecord

I'm looking at leveraging an existing Microsoft SQL Server Analysis Service (SSAS) instance for a reporting project. The goal is to have the data compiled in SSAS, then a web front-end that allows the user change time-periods, while building graphics (using D3 or the like).
Google has not been my friend in finding a solution for this...
Is there a gem or other way to connect SSAS to a Rails front-end?
Thanks
JSON, no, not that I know of. However if you are willing to use XML, then yes. XMLA (documented here) is the client API language for SSAS.
One approach would be to build a web service with .NET, and then have your Rails front-end call the web service.
I suppose you could use XMLA directly, but it's painful.

web services between rails and j2se

I developed a web site using rails 2.3.8, and a IM server using openfire(java). I want to share some data between them, or exactly rails as provider, openfire as consumer. A possible way is using web service. But it seems that rails 2.x has deprecated the default SOAP support, I installed the gem activewebservice, but there is lack of documents to show how to using it. I googled an example in IBM's site, but there seems something wrong to follow this guide in rails 2.3.8. Can anyone give me an example?
I know there is another way to provide the web service is using rails' default RESTful-type web service, but how to configure the java side to support this?
Rails has support for RESTful web-services OOTB, so if you have developed your rails application using scaffold generator then your application is already providing a RESTful API. Now as your IM server is the consumer, all you have to do is to make your IM server call the RESTful API provided by the rails application.
Calling RESTful API means sending HTTP (GET/POST/PUT/DELETE) requests to the REST server(Rails App). So all you need to do, is plugin some java code to the openfire server which will send the HTTP requests adhering to the REST conventions and send/receive data in a suitable serialization format(XML/JSON/etc). There is a plugin mechanism in openfire which which probably may help you achieve this.
As far as RESTful calls are concerned, this can be achieved in any of the below methods:
Use a REST Client library provided by JAX-RS implementations like Jersey, Apache wink, etc.
Use any HTTP client library to send/receive HTTP requests/response and a XML/JSON/etc library to serialize/de-serialize the data.

Consuming XML/SOAP web service in RoR

I know they removed ActionService out of RoR and opted for RESTful web services. I want to know if Rails is a good choice of a framework for consuming XML/SOAP based web services. Can anyone point out some nice resources/tutorials on how to consume a SOAP based web service in ROR?
This is a pretty good step-by-step tutorial for soap4r: [link no longer works]

Resources