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

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

Revision 1843, 0.8 kB (checked in by nahi, 2 years ago)
  • reorganize sampless
  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1 require 'soap/rpc/driver'
2
3 server = ARGV.shift || 'http://localhost:7000/'
4 # server = 'http://localhost:8808/server.cgi'
5
6 # client which accesses application scope servant.
7 app = SOAP::RPC::Driver.new(server,
8   'http://tempuri.org/applicationScopeService')
9 app.add_method('push', 'value')
10 app.add_method('pop')
11
12 # client which accesses request scope servant must send SOAPAction to identify
13 # the service.
14 req = SOAP::RPC::Driver.new(server,
15   'http://tempuri.org/requestScopeService')
16 req.add_method_with_soapaction('push',
17   'http://tempuri.org/requestScopeService', 'value')
18 req.add_method_with_soapaction('pop',
19   'http://tempuri.org/requestScopeService')
20
21 # exec
22 app.push(1)
23 app.push(2)
24 app.push(3)
25 p app.pop
26 p app.pop
27 p app.pop
28
29 req.push(1)
30 req.push(2)
31 req.push(3)
32 p req.pop
33 p req.pop
34 p req.pop
Note: See TracBrowser for help on using the browser.