troelskn-handsoap 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/handsoap/parser.rb +6 -4
  3. metadata +1 -1
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 3
2
+ :patch: 4
3
3
  :major: 0
4
4
  :minor: 2
@@ -85,7 +85,8 @@ module Handsoap
85
85
  private :ns
86
86
 
87
87
  def protocol_from_ns(node)
88
- case @doc.namespaces["xmlns:#{node.namespace}"]
88
+ href = node.namespace.respond_to?(:href) ? node.namespace.href : @doc.namespaces["xmlns:#{node.namespace.href}"]
89
+ case href
89
90
  when "http://schemas.xmlsoap.org/wsdl/soap/"
90
91
  :soap11
91
92
  when "http://schemas.xmlsoap.org/wsdl/soap12/"
@@ -93,19 +94,20 @@ module Handsoap
93
94
  when "http://schemas.xmlsoap.org/wsdl/http/"
94
95
  :http
95
96
  else
96
- raise "Unknown namespace '#{node.namespace}'"
97
+ raise "Unknown namespace '#{href}'"
97
98
  end
98
99
  end
99
100
  private :protocol_from_ns
100
101
 
101
102
  def is_wsdl2?(node)
102
- case @doc.namespaces["xmlns:#{node.namespace}"]
103
+ href = node.namespace.respond_to?(:href) ? node.namespace.href : @doc.namespaces["xmlns:#{node.namespace.href}"]
104
+ case href
103
105
  when "http://schemas.xmlsoap.org/wsdl/"
104
106
  false
105
107
  when "http://www.w3.org/ns/wsdl/"
106
108
  true
107
109
  else
108
- raise "Unknown namespace '#{node.namespace}'"
110
+ raise "Unknown namespace '#{href}'"
109
111
  end
110
112
  end
111
113
  private :is_wsdl2?
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.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Troels Knak-Nielsen