Sha256: 5735cccf72cae5d06354032d3c475e657beb4e871b4a22ab90f1f53b7b88666b
Contents?: true
Size: 851 Bytes
Versions: 3
Compression:
Stored size: 851 Bytes
Contents
require 'roo' require 'soap/rpc/standaloneServer' NS = "spreadsheetserver" # name of your service = namespace class Server2 < SOAP::RPC::StandaloneServer def on_init spreadsheet = Openoffice.new("./Ferien-de.ods") add_method(spreadsheet, 'cell', 'row', 'col') add_method(spreadsheet, 'officeversion') add_method(spreadsheet, 'first_row') add_method(spreadsheet, 'last_row') add_method(spreadsheet, 'first_column') add_method(spreadsheet, 'last_column') add_method(spreadsheet, 'sheets') #add_method(spreadsheet, 'default_sheet=', 's') # method with '...=' did not work? alias method 'set_default_sheet' created add_method(spreadsheet, 'set_default_sheet', 's') end end PORT = 12321 puts "serving at port #{PORT}" svr = Server2.new('Roo', NS, '0.0.0.0', PORT) trap('INT') { svr.shutdown } svr.start
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
roo-1.11.2 | examples/roo_soap_server.rb |
roo-1.11.1 | examples/roo_soap_server.rb |
roo-1.11.0 | examples/roo_soap_server.rb |