My First Web Service

by Brian on 3/16/2007

So, I made my first webservice using xml-rpc. The server providing the service was created using Ruby, and Ruby’s XMLRPC classes’s builtin HTTP server WEBrick to host the service. Here’s the Ruby code:

require ‘xmlrpc/server’

s = XMLRPC::Server.new(8081)
s.add_handler(“sample.test”) do
{“hello” => “goodbye”}
end
s.serve

I then created a Java class which requested the services, and read the hash table returned by the service. I’m still thinking about how, or if XMLRPC will be the best way to go to accomplish RPCs. In my head I can picture a simple XMLRPC wrapper to the class I wish to access, however, I am undecided about security and running the service with the correct permissions.

Related posts:

  1. Why we don’t send IT service people a Thank You card?
  2. Story2Oh! in Violation of Facebook Terms of Service
  3. When Trouble Strikes – How to Monitor Your Services
  4. New Broadband Service
  5. Netbeans Ruby Code Completion

Previous post:

Next post: