ruby/sample/soap/swa/client.rb
(no author) 5548c7bff2 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-03 15:38:36 +00:00

13 lines
369 B
Ruby

require 'soap/rpc/driver'
require 'soap/attachment'
server = 'http://localhost:7000/'
driver = SOAP::RPC::Driver.new(server, 'http://www.acmetron.com/soap')
driver.wiredump_dev = STDERR
driver.add_method('get_file')
driver.add_method('put_file', 'name', 'file')
p driver.get_file
file = File.open($0)
attach = SOAP::Attachment.new(file)
p driver.put_file($0, attach)