summaryrefslogtreecommitdiff
path: root/sample/soap/swa/client.rb
blob: 01c59a38452b484ee0bf332cb9b43d54bd81109c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)