Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/branches/1_5/sample/howto/base64/client.rb

Revision 1843, 498 bytes (checked in by nahi, 2 years ago)
  • reorganize sampless
Line 
1 require 'soap/rpc/driver'
2
3 server = ARGV.shift || 'http://localhost:7000/'
4
5 drv = SOAP::RPC::Driver.new(server, 'http://tempuri.org/base64Service')
6 drv.wiredump_dev = STDERR if $DEBUG
7
8 drv.add_method('echo', 'arg')
9 drv.add_method('echo_base64', 'arg')
10
11 binary = "\0\0\0"
12 text = "000"
13
14 drv.echo(binary)        # => binary is automatically converted to Base64
15
16 drv.echo(text)                              # => send as String
17 drv.echo_base64(SOAP::SOAPBase64.new(text)) # => send as Base64 explicitly
Note: See TracBrowser for help on using the browser.