serviceproxy 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -24,4 +24,4 @@ Please refer to the specs for extended usage examples.
24
24
 
25
25
  CONTRIBUTORS
26
26
 
27
- Rich Cavanaugh
27
+ Rich Cavanaugh
@@ -86,6 +86,11 @@ module ServiceProxy
86
86
  method_list << operation_name
87
87
  self.soap_actions[operation_name] = operation.get_attribute('soapAction')
88
88
  end
89
+ self.wsdl.xpath('//*[name()="wsdl:operation"]').each do |wsdl_operation|
90
+ operation_name = wsdl_operation.get_attribute('name')
91
+ method_list << operation_name
92
+ self.soap_actions[operation_name] = wsdl_operation.xpath('//*[name()="wsdlsoap:operation"]').first.get_attribute('soapAction')
93
+ end
89
94
  raise RuntimeError, "Could not parse WSDL" if method_list.empty?
90
95
  self.service_methods = method_list.sort
91
96
 
@@ -45,4 +45,7 @@ class InvalidSHAGeneratorService < ServiceProxy::Base
45
45
  end
46
46
  end
47
47
 
48
+ end
49
+
50
+ class EbayService < ServiceProxy::Base
48
51
  end
@@ -43,6 +43,16 @@ describe ServiceProxy do
43
43
  end
44
44
  end
45
45
 
46
+ describe "connecting to the Ebay Service" do
47
+ before do
48
+ @proxy = EbayService.new('http://developer.ebay.com/webservices/latest/eBaySvc.wsdl')
49
+ end
50
+
51
+ it "should have methods" do
52
+ @proxy.service_methods.should_not be_nil
53
+ end
54
+ end
55
+
46
56
  describe "making a service call without a parse method" do
47
57
  before do
48
58
  @proxy = InvalidSHAGeneratorService.new('https://sec.neurofuzz-software.com/paos/genSSHA-SOAP.php?wsdl')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serviceproxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Durham
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-13 00:00:00 -05:00
12
+ date: 2009-10-23 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency