Can Lua interoperate with CORBA or Web Services?

A comprehensive Lua implementation of CORBA is provided by Oil

There is a commercial product for providing JSON web services with Lua.

It is straightforward to access JSON-style web services:

-- Client for the Yahoo Traffic API (http://developer.yahoo.com/traffic/rest/V1/index.html)
-- using JSON and Lua
-- Matt Croydon (matt@ooiio.com) http://postneo.com http = require("socket.http")
json = require("json")
-- Retrieve traffic information for Kansas City, MO r, c, h = http.request("http://local.yahooapis.com/MapsService/V1/trafficData?appid=LuaDemo&city=Kansas+City&state=MO&output=json")
if c == 200 then
 -- Process the response
 results = json.decode(r).ResultSet.Result
 -- Iterate over the results
 for i=1,#results do
 print("Result "..i..":")
 table.foreach(results[i], print)
 print()
 end end

See LuaTwitter for another more detailed example of what can be done with Lua and JSON interfaces.

The Kepler Project supports XML-RPC with LuaXMLRPC. Here is a small client example:

require "xmlrpc.http"
local ok, res = xmlrpc.http.call ("http://www.oraclenet.com/meerkat/xml-rpc/server.php", "system.listMethods")
print (ok)
for i, v in pairs(res) do print ('\t', i, v) end

7 C API



Back