troelskn-handsoap 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/handsoap/parser.rb +13 -3
  3. metadata +4 -3
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 4
2
+ :patch: 5
3
3
  :major: 0
4
4
  :minor: 5
@@ -129,9 +129,19 @@ module Handsoap
129
129
  end
130
130
 
131
131
  def interface
132
- tmp = interfaces
133
- raise "Expected exactly 1 interface/portType in WSDL" if tmp.length != 1
134
- tmp[0]
132
+ all_interfaces = self.interfaces
133
+ if all_interfaces.length != 1
134
+ # There are more than one portType, so we take a pick
135
+ all_bindings = self.bindings
136
+ all_interfaces.each do |interface|
137
+ b = all_bindings.find {|binding| binding.name == interface.name }
138
+ if [:soap11, :soap12].include? b.protocol
139
+ return interface
140
+ end
141
+ end
142
+ raise "Can't find a suitable soap 1.1 or 1.2 interface/portType in WSDL"
143
+ end
144
+ all_interfaces.first
135
145
  end
136
146
 
137
147
  def target_ns
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: troelskn-handsoap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Troels Knak-Nielsen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-06 00:00:00 -07:00
12
+ date: 2009-09-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -36,6 +36,7 @@ files:
36
36
  - lib/handsoap/xml_query_front.rb
37
37
  has_rdoc: false
38
38
  homepage: http://github.com/troelskn/handsoap
39
+ licenses:
39
40
  post_install_message:
40
41
  rdoc_options:
41
42
  - --charset=UTF-8
@@ -60,7 +61,7 @@ requirements:
60
61
  gem install httpclient
61
62
  - It is recommended that you install either "nokogiri" or "libxml-ruby"
62
63
  rubyforge_project:
63
- rubygems_version: 1.2.0
64
+ rubygems_version: 1.3.5
64
65
  signing_key:
65
66
  specification_version: 3
66
67
  summary: Handsoap is a library for creating SOAP clients in Ruby