Sha256: bb558ea42ed973b937419b64a08cf9a2065ef3f937df0233f96eb67255a98e73

Contents?: true

Size: 870 Bytes

Versions: 40

Compression:

Stored size: 870 Bytes

Contents

require 'rubygems'
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

40 entries across 40 versions & 5 rubygems

Version Path
jagthedrummer-roo-1.3.12 examples/roo_soap_server.rb
roo-1.10.3 examples/roo_soap_server.rb
roo-1.10.2 examples/roo_soap_server.rb
roo-immersion-1.0.0 examples/roo_soap_server.rb
donibuchanan-roo-1.9.1.6 examples/roo_soap_server.rb
donibuchanan-roo-1.9.1.5 examples/roo_soap_server.rb
aunderwo-roo-1.1.2 examples/roo_soap_server.rb
aunderwo-roo-1.1.1 examples/roo_soap_server.rb
aunderwo-roo-1.1.0 examples/roo_soap_server.rb
donibuchanan-roo-1.9.1.4 examples/roo_soap_server.rb
donibuchanan-roo-1.3.12 examples/roo_soap_server.rb
aunderwo-roo-1.0.0 examples/roo_soap_server.rb
roo-1.3.11 examples/roo_soap_server.rb
roo-0.5.2 examples/roo_soap_server.rb
roo-0.5.0 examples/roo_soap_server.rb
roo-0.5.1 examples/roo_soap_server.rb
roo-0.5.3 examples/roo_soap_server.rb
roo-0.6.1 examples/roo_soap_server.rb
roo-0.6.0 examples/roo_soap_server.rb
roo-0.7.0 examples/roo_soap_server.rb