I am successfully using Ruby with Savon to communicate with a set of SOAP services, but it turns out that in order to send and receive attachments the service expects them to use DIME encapsulation. Has anyone managed this using Ruby? If not, what would be a recommended way to approach this problem? This communication is only one part of a Rails application, so ideally the solution would be integrated with the rest of the application.
Related
I am aware of rails REST interface which allow me to access sources.
and I am aware of publish-subscribe strategy for message passing
Is it possible to implement REST client(not browser but ruby client works on arduino device) to access resource if resource (ex. server informed client that resource is now available you can receive) available via publish subscribe strategy ?
I am aware of Faye. is it possible to implement REST client using Faye to receive via publish-subscribe for ruby ? If it is not possible with Faye which can be other solution for Ruby REST client to build a publish subscribe communication ? How can Faye inform ruby client for resource notification ?
REST is based on HTTP, so it is Request-Response.
you can't make Pub/Sub service with REST.
If I were you, I would use Faye to notify client about new resources, or whatever you want to monitor.
And after notification you can make Ajax request to REST and get new record for example.
But the best approach is to use Faye for pushing changes to client.
Don't be aware, it is quite simple.
I am creating a job website where candidate fill his information and admin/team member can modify these detail and after modification i want to send this data to some other application where it get saves .notice that i want to push each single record like in every candidate information page there will be a button for "push to other application"
I am thinking to do this by creating soap services and sending data through soap api,so please help me by assisting how can i create soap api in rails and send data tho other application.
And please assist me the other ways how can i do this.
Thanks!
You can connect to other application database and insert the records. The other application can read the records from its database. It is easier to use database communication than soap.
You should not even think about creating a SOAP service, there are no any good implementations of it in Ruby.
Consider using REST API and ActiveResource instead.
ActiveResource GitHub page
ActiveResource 3.2.17 Docs
There are RailsCasts about ActiveResource, though they are a bit outdated you'll get the idea.
#94 ActiveResource Basics
#95 More on ActiveResource
However if for some reason you decide to create a SOAP service take a look at WashOut and Savon gems.
Hello I want to pass a phone number, customer name and sellers number to a web service. But i am new on ruby on rails. I want to know how I can design a soap message getting details from my order form, and then pass them to the web service in my OrderController. Please I need your assistance.
I'm using Savon for dealing with soap, it works fine and has nice, easy syntax.
I'm trying to consume a SOAP web service, (from SharePoint 2010 if it makes a difference). I'm using Ruby 1.9 and Rails 3. What is the best way to do this? I've read some stuff mentioning Savon http://savonrb.com/ but that is was too new and buggy. Is it still the best solution? Thanks.
I used Savon successfully to interact with the Bullhorn Staffing SOAP based service about six months ago. I didn't have any problems with the Savon Gem, all my headaches came from inconsistencies with the service.
My interactions with their service was limited to getting data (simple) and pushing data, which could include a resume file (more complex). I didn't have to look much further than the Savon doc to figure everything out, which I thought was simple to understand and easy to apply to my particular set of problems.
TLDR; 1 vote for Savon despite what you may have heard.
I used savon to interact with Jira SOAP API and it worked fine.
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.