lolsoap 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/lolsoap/wsdl_parser.rb +5 -4
- data/lolsoap.gemspec +2 -2
- data/test/fixtures/stock_quote.wsdl +8 -1
- data/test/integration/test_wsdl.rb +1 -1
- data/test/unit/test_wsdl_parser.rb +7 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/lolsoap/wsdl_parser.rb
CHANGED
@@ -57,7 +57,7 @@ module LolSoap
|
|
57
57
|
|
58
58
|
def base_type
|
59
59
|
@base_type ||= begin
|
60
|
-
if extension = node.at_xpath('xs:
|
60
|
+
if extension = node.at_xpath('*/xs:extension/@base', parser.ns)
|
61
61
|
parser.type(extension.to_s)
|
62
62
|
end
|
63
63
|
end
|
@@ -150,9 +150,10 @@ module LolSoap
|
|
150
150
|
|
151
151
|
def type(name)
|
152
152
|
name = prefix_and_name(name).last
|
153
|
-
node = doc.at_xpath("//xs:complexType[@name='#{name}']", ns)
|
154
|
-
|
155
|
-
|
153
|
+
if node = doc.at_xpath("//xs:complexType[@name='#{name}']", ns)
|
154
|
+
target_namespace = node.at_xpath('parent::xs:schema/@targetNamespace', ns).to_s
|
155
|
+
Type.new(self, node, target_namespace)
|
156
|
+
end
|
156
157
|
end
|
157
158
|
|
158
159
|
def elements
|
data/lolsoap.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "lolsoap"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jon Leighton"]
|
12
|
-
s.date = "2013-06-
|
12
|
+
s.date = "2013-06-27"
|
13
13
|
s.description = "A library for dealing with SOAP requests and responses. We tear our hair out so you don't have to."
|
14
14
|
s.email = "j@jonathanleighton.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -13,10 +13,17 @@
|
|
13
13
|
<schema targetNamespace="http://example.com/stockquote.xsd"
|
14
14
|
xmlns:xsd3="http://example.com/stockquote.xsd"
|
15
15
|
xmlns="http://www.w3.org/2001/XMLSchema">
|
16
|
+
<complexType name="Price">
|
17
|
+
<simpleContent>
|
18
|
+
<extension base="xs:string">
|
19
|
+
<attribute name="currency" type="xs:string"/>
|
20
|
+
</extension>
|
21
|
+
</simpleContent>
|
22
|
+
</complexType>
|
16
23
|
<element name="TradePrice">
|
17
24
|
<complexType>
|
18
25
|
<all>
|
19
|
-
<element name="xsd3:price" type="
|
26
|
+
<element name="xsd3:price" type="Price"/>
|
20
27
|
</all>
|
21
28
|
</complexType>
|
22
29
|
</element>
|
@@ -33,6 +33,12 @@ module LolSoap
|
|
33
33
|
describe '#types' do
|
34
34
|
it 'returns the types, with attributes and namespace' do
|
35
35
|
subject.types.must_equal({
|
36
|
+
'xsd1:Price' => {
|
37
|
+
:prefix => 'xsd1',
|
38
|
+
:name => 'Price',
|
39
|
+
:elements => {},
|
40
|
+
:attributes => ['currency']
|
41
|
+
},
|
36
42
|
'xsd1:TradePriceRequest' => {
|
37
43
|
:prefix => 'xsd1',
|
38
44
|
:name => 'TradePriceRequest',
|
@@ -126,7 +132,7 @@ module LolSoap
|
|
126
132
|
'price' => {
|
127
133
|
:name => 'price',
|
128
134
|
:prefix => 'xsd1',
|
129
|
-
:type => '
|
135
|
+
:type => 'xsd1:Price',
|
130
136
|
:singular => true
|
131
137
|
}
|
132
138
|
},
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolsoap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -164,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '0'
|
165
165
|
segments:
|
166
166
|
- 0
|
167
|
-
hash:
|
167
|
+
hash: 765502511
|
168
168
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
169
|
none: false
|
170
170
|
requirements:
|