Sha256: 972411842cffe283a417e369e6a225d9b787cf74ec1905b1e3f4b6fc79358dd8

Contents?: true

Size: 851 Bytes

Versions: 25

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 = 12_321
puts "serving at port #{PORT}"
svr = Server2.new('Roo', NS, '0.0.0.0', PORT)

trap('INT') { svr.shutdown }
svr.start

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
roo-2.10.1 examples/roo_soap_server.rb
roo-2.10.0 examples/roo_soap_server.rb
roo-2.9.0 examples/roo_soap_server.rb
roo-2.8.3 examples/roo_soap_server.rb
roo-2.8.2 examples/roo_soap_server.rb
roo-2.8.1 examples/roo_soap_server.rb
roo-2.8.0 examples/roo_soap_server.rb
roo-2.7.1 examples/roo_soap_server.rb
roo-2.7.0 examples/roo_soap_server.rb
roo-2.6.0 examples/roo_soap_server.rb
roo-2.5.1 examples/roo_soap_server.rb
roo-2.5.0 examples/roo_soap_server.rb
roo-2.4.0 examples/roo_soap_server.rb
roo-2.3.2 examples/roo_soap_server.rb
roo-2.3.1 examples/roo_soap_server.rb
roo-2.3.0 examples/roo_soap_server.rb
roo-2.2.0 examples/roo_soap_server.rb
roo-2.1.1 examples/roo_soap_server.rb
roo-2.1.0 examples/roo_soap_server.rb
roo-2.0.1 examples/roo_soap_server.rb