-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.rb
More file actions
26 lines (22 loc) · 768 Bytes
/
example.rb
File metadata and controls
26 lines (22 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'ruby2soap'
def complex_object_example
handler = Ruby2Soap.new('http://localhost:1659/Service1.svc')
res = handler.GetDataUsingDataContract(:composite => {
:BoolValue => true,
:StringValue => "ruby2soap"
})
res.result['StringValue']
end
def cookie_state_full_example
handler = Ruby2Soap.new('http://localhost:1659/Service1.svc')
handler.Init(:userName => 'ericman93')
handler.IncreaseScore()
end
def few_params_example
handler = Ruby2Soap.new('http://www.webservicex.net/CurrencyConvertor.asmx')
handler.ConversionRate(:FromCurrency => 'ILS', :ToCurrency => 'GBP').result
end
def ntlm_example
handler = Ruby2Soap.new('http://localhost:1659/Service1.svc')
handler.AddPoints({:points => 6},SecutryProtocol::NTLM,'user','password','domain')
end