troelskn-handsoap 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/handsoap/parser.rb +6 -4
- metadata +1 -1
data/VERSION.yml
CHANGED
data/lib/handsoap/parser.rb
CHANGED
@@ -85,7 +85,8 @@ module Handsoap
|
|
85
85
|
private :ns
|
86
86
|
|
87
87
|
def protocol_from_ns(node)
|
88
|
-
|
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 '#{
|
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
|
-
|
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 '#{
|
110
|
+
raise "Unknown namespace '#{href}'"
|
109
111
|
end
|
110
112
|
end
|
111
113
|
private :is_wsdl2?
|