From: Rich Kilmer Date: 2002-02-13T14:56:10+09:00 Subject: Cool XML-RPC service How's this for cool. Microsoft Word has a capability to summarize documents to a percentage of their original size. The following uses xmlrpc4r and win32ole to mount your local copy of Word as a document summarization service! This is obviously a Win32 example, but the client could run from Linux ;) File summary_service.rb: require "xmlrpc/server" require "win32ole" word = WIN32OLE.new('Word.Application') doc = word.Documents.Add server = XMLRPC::Server.new(8080, "0.0.0.0") server.add_handler("word.autosummarize") do |text, percent| doc.Content=text doc.AutoSummarize(percent, 2).text[8..-1] #note: 8..-1 gets rid of the word "summary" end server.serve doc.Close(0) word.quit File summary_cliet.rb require 'xmlrpc/client' summarizer = XMLRPC::Client.new2("http://localhost:8080") puts summarizer.call('word.autosummarize', DATA.read, 30) __END__ The fantasy epic The Lord of the Rings: The Fellowship of the Ring won best-picture honors and two other prizes at the first American Film Institute Awards on Saturday. Based on J.R. R. Tolkiens trilogy about hobbits, wizards, elves and a ring of ultimate power, the three parts of Lord of the Rings were shot simultaneously. Part two is due out next Christmas, with the final chapter coming in 2003. It is a classic epic. It is a true adventure, said Elijah Wood, who stars as the hobbit Frodo Baggins. I think it appeals to people of all ages, and it has for years and years. What other cool services could be built this way? -rich