they-savon 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +10 -0
- data/.rspec +1 -0
- data/.travis.yml +13 -0
- data/CHANGELOG.md +631 -0
- data/Gemfile +9 -0
- data/LICENSE +20 -0
- data/README.md +42 -0
- data/Rakefile +7 -0
- data/lib/savon/client.rb +168 -0
- data/lib/savon/core_ext/object.rb +14 -0
- data/lib/savon/core_ext/string.rb +23 -0
- data/lib/savon/error.rb +6 -0
- data/lib/savon/global.rb +129 -0
- data/lib/savon/http/error.rb +42 -0
- data/lib/savon/soap/fault.rb +59 -0
- data/lib/savon/soap/request.rb +71 -0
- data/lib/savon/soap/response.rb +109 -0
- data/lib/savon/soap/xml.rb +227 -0
- data/lib/savon/soap.rb +21 -0
- data/lib/savon/version.rb +5 -0
- data/lib/savon/wasabi/document.rb +41 -0
- data/lib/savon.rb +14 -0
- data/savon.gemspec +32 -0
- data/spec/fixtures/gzip/message.gz +0 -0
- data/spec/fixtures/response/another_soap_fault.xml +14 -0
- data/spec/fixtures/response/authentication.xml +14 -0
- data/spec/fixtures/response/header.xml +13 -0
- data/spec/fixtures/response/list.xml +18 -0
- data/spec/fixtures/response/multi_ref.xml +39 -0
- data/spec/fixtures/response/soap_fault.xml +8 -0
- data/spec/fixtures/response/soap_fault12.xml +18 -0
- data/spec/fixtures/response/taxcloud.xml +1 -0
- data/spec/fixtures/wsdl/authentication.xml +63 -0
- data/spec/fixtures/wsdl/lower_camel.xml +52 -0
- data/spec/fixtures/wsdl/multiple_namespaces.xml +61 -0
- data/spec/fixtures/wsdl/multiple_types.xml +60 -0
- data/spec/fixtures/wsdl/taxcloud.xml +934 -0
- data/spec/savon/client_spec.rb +461 -0
- data/spec/savon/core_ext/object_spec.rb +19 -0
- data/spec/savon/core_ext/string_spec.rb +37 -0
- data/spec/savon/http/error_spec.rb +52 -0
- data/spec/savon/savon_spec.rb +146 -0
- data/spec/savon/soap/fault_spec.rb +89 -0
- data/spec/savon/soap/request_spec.rb +57 -0
- data/spec/savon/soap/response_spec.rb +224 -0
- data/spec/savon/soap/xml_spec.rb +309 -0
- data/spec/savon/soap_spec.rb +16 -0
- data/spec/savon/wasabi/document_spec.rb +45 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/support/endpoint.rb +25 -0
- data/spec/support/fixture.rb +35 -0
- metadata +216 -0
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/.travis.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# https://github.com/travis-ci/travis-ci/wiki/.travis.yml-options
|
2
|
+
bundler_args: --without developer_happiness
|
3
|
+
script: "bundle exec rake"
|
4
|
+
rvm:
|
5
|
+
- 1.8.7
|
6
|
+
- 1.9.2
|
7
|
+
- 1.9.3
|
8
|
+
- ree
|
9
|
+
- rbx
|
10
|
+
- rbx-2.0
|
11
|
+
- jruby
|
12
|
+
notifications:
|
13
|
+
irc: "irc.freenode.org#savon"
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,631 @@
|
|
1
|
+
## 0.9.7 (2011-08-25)
|
2
|
+
|
3
|
+
* Feature: Merged [pull request 210](https://github.com/rubiii/savon/pull/210) by
|
4
|
+
[mboeh](https://github.com/mboeh) to add `Savon::SOAP::Response#doc` and
|
5
|
+
`Savon::SOAP::Response#xpath`.
|
6
|
+
|
7
|
+
* Feature: Merged [pull request 211](https://github.com/rubiii/savon/pull/211) by
|
8
|
+
[mattkirman](https://github.com/mattkirman) to fix [issue 202](https://github.com/rubiii/savon/issues/202).
|
9
|
+
|
10
|
+
* Feature: You can now pass a block to `Savon::SOAP::XML#body` and use Builder to create the XML:
|
11
|
+
|
12
|
+
``` ruby
|
13
|
+
client.request(:find) do
|
14
|
+
soap.body do |xml|
|
15
|
+
xml.user do
|
16
|
+
xml.id 601173
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
```
|
21
|
+
|
22
|
+
* Fix: [issue 218](https://github.com/rubiii/savon/pull/218) - Savon now correctly handles namespaced
|
23
|
+
Array items in a Hash passed to `Savon::SOAP::XML#body=`.
|
24
|
+
|
25
|
+
* Fix: Merged [pull request 212](https://github.com/rubiii/savon/pull/212) to fix
|
26
|
+
[savon_spec issue 2](https://github.com/rubiii/savon_spec/issues/2).
|
27
|
+
|
28
|
+
* Improvement: [issue 222](https://github.com/rubiii/savon/issues/222) - Set the Content-Length header.
|
29
|
+
|
30
|
+
## 0.9.6 (2011-07-07)
|
31
|
+
|
32
|
+
* Improvement/Fix: Updated Savon to use the latest version of [Wasabi](http://rubygems.org/gems/wasabi).
|
33
|
+
This should fix [issue 155](https://github.com/rubiii/savon/issues/155) - Savon can automatically add namespaces
|
34
|
+
to SOAP requests based on the WSDL. Users shouldn't need to do anything differently or even notice whether their WSDL
|
35
|
+
hits this case; the intention is that this will "Just Work" and follow the WSDL. The SOAP details are that if
|
36
|
+
elementFormDefault is specified as qualified, Savon will automatically prepend the correct XML namespaces to the
|
37
|
+
elements in a SOAP request. Thanks to [jkingdon](https://github.com/jkingdon) for this.
|
38
|
+
|
39
|
+
* Fix: [issue 143](https://github.com/rubiii/savon/issues/143) - Updating Wasabi should solve this issue.
|
40
|
+
|
41
|
+
## 0.9.5 (2011-07-03)
|
42
|
+
|
43
|
+
* Refactoring: Extracted WSSE authentication out into the [akami](http://rubygems.org/gems/akami) gem.
|
44
|
+
|
45
|
+
## 0.9.4 (2011-07-03)
|
46
|
+
|
47
|
+
* Refactoring: Extracted the WSDL parser out into the [wasabi](http://rubygems.org/gems/wasabi) gem.
|
48
|
+
This should isolate upcoming improvements to the parser.
|
49
|
+
|
50
|
+
## 0.9.3 (2011-06-30)
|
51
|
+
|
52
|
+
* Fix: [issue 138](https://github.com/rubiii/savon/issues/138) -
|
53
|
+
Savon now supports setting a global SOAP header via `Savon.soap_header=`.
|
54
|
+
|
55
|
+
* Fixed the namespace for wsse message timestamps from `wsse:Timestamp`
|
56
|
+
to `wsu:Timestamp` as required by the specification.
|
57
|
+
|
58
|
+
* Change: Removed support for NTLM authentication until it's stable. If you need it, you can still
|
59
|
+
add the following line to your Gemfile:
|
60
|
+
|
61
|
+
``` ruby
|
62
|
+
gem "httpi", "0.9.4"
|
63
|
+
```
|
64
|
+
|
65
|
+
* Refactoring:
|
66
|
+
|
67
|
+
* `Hash#map_soap_response` and some of its helpers are moved to [Nori v1.0.0](http://rubygems.org/gems/nori/versions/1.0.0).
|
68
|
+
Along with replacing core extensions with a proper implementation, Nori now contains a number of methods
|
69
|
+
for [configuring its default behavior](https://github.com/rubiii/nori/blob/master/CHANGELOG.md):
|
70
|
+
|
71
|
+
* The option whether to strip namespaces was moved to Nori.strip_namespaces
|
72
|
+
* You can disable "advanced typecasting" for SOAP response values
|
73
|
+
* And you can configure how SOAP response keys should be converted
|
74
|
+
|
75
|
+
* `Savon::SOAP::XML.to_hash`, `Savon::SOAP::XML.parse` and `Savon::SOAP::XML.to_array` are gone.
|
76
|
+
It wasn't worth keeping them around, because they didn't do much. You can simply parse a SOAP
|
77
|
+
response and translate it to a Savon SOAP response Hash via:
|
78
|
+
|
79
|
+
``` ruby
|
80
|
+
Nori.parse(xml)[:envelope][:body]
|
81
|
+
```
|
82
|
+
|
83
|
+
* `Savon::SOAP::Response#basic_hash` is now `Savon::SOAP::Response#hash`.
|
84
|
+
|
85
|
+
## 0.9.2 (2011-04-30)
|
86
|
+
|
87
|
+
* Fix: [issue 154](https://github.com/rubiii/savon/pull/154) -
|
88
|
+
Timezone format used by Savon now matches the XML schema spec.
|
89
|
+
|
90
|
+
* Improvement: WSSE basic, digest and timestamp authentication are no longer mutually exclusive.
|
91
|
+
Thanks to [mleon](https://github.com/mleon) for solving [issue #142](https://github.com/rubiii/savon/issues/142).
|
92
|
+
|
93
|
+
* Improvement: Switched from using Crack to translate the SOAP response to a Hash to using
|
94
|
+
[Nori](http://rubygems.org/gems/nori). It's based on Crack and comes with pluggable parsers.
|
95
|
+
It defaults to REXML, but you can switch to Nokogiri via:
|
96
|
+
|
97
|
+
``` ruby
|
98
|
+
Nori.parser = :nokogiri
|
99
|
+
```
|
100
|
+
|
101
|
+
* Improvement: WSDL parsing now uses Nokogiri instead of REXML.
|
102
|
+
|
103
|
+
## 0.9.1 (2011-04-06)
|
104
|
+
|
105
|
+
* Improvement: if you're only setting the local or remote address of your wsdl document, you can
|
106
|
+
now pass an (optional) String to `Savon::Client.new` to set `wsdl.document`.
|
107
|
+
|
108
|
+
``` ruby
|
109
|
+
Savon::Client.new "http://example.com/UserService?wsdl"
|
110
|
+
```
|
111
|
+
|
112
|
+
* Improvement: instead of calling the `to_hash` method of your response again and again and again,
|
113
|
+
there is now a ' #[]` shortcut for you.
|
114
|
+
|
115
|
+
``` ruby
|
116
|
+
response[:authenticate_response][:return]
|
117
|
+
```
|
118
|
+
|
119
|
+
## 0.9.0 (2011-04-05)
|
120
|
+
|
121
|
+
* Feature: issues [#158](https://github.com/rubiii/savon/issues/158),
|
122
|
+
[#169](https://github.com/rubiii/savon/issues/169) and [#172](https://github.com/rubiii/savon/issues/172)
|
123
|
+
configurable "Hash key Symbol to lowerCamelCase" conversion by using the latest version of
|
124
|
+
[Gyoku](http://rubygems.org/gems/gyoku).
|
125
|
+
|
126
|
+
``` ruby
|
127
|
+
Gyoku.convert_symbols_to(:camelcase)
|
128
|
+
Gyoku.xml(:first_name => "Mac") # => "<FirstName></Firstname>"
|
129
|
+
```
|
130
|
+
|
131
|
+
You can even define your own conversion formular.
|
132
|
+
|
133
|
+
``` ruby
|
134
|
+
Gyoku.convert_symbols_to { |key| key.upcase }
|
135
|
+
Gyoku.xml(:first_name => "Mac") # => "<FIRST_NAME></FIRST_NAME>"
|
136
|
+
```
|
137
|
+
|
138
|
+
This should also work for the SOAP input tag and SOAPAction header. So if you had to use a String for
|
139
|
+
the SOAP action to call because your services uses CamelCase instead of lowerCamelCase, you can now
|
140
|
+
change the default and use Symbols instead.
|
141
|
+
|
142
|
+
``` ruby
|
143
|
+
Gyoku.convert_symbols_to(:camelcase)
|
144
|
+
|
145
|
+
# pre Gyoku 0.4.0
|
146
|
+
client.request(:get_user) # => "<getUser/>
|
147
|
+
client.request("GetUser") # => "<GetUser/>"
|
148
|
+
|
149
|
+
# post Gyoku 0.4.0
|
150
|
+
client.request(:get_user) # => "<GetUser/>"
|
151
|
+
```
|
152
|
+
|
153
|
+
* Improvement: issues [#170](https://github.com/rubiii/savon/issues/170) and
|
154
|
+
[#173](https://github.com/rubiii/savon/issues/173) Savon no longer rescues exceptions raised by
|
155
|
+
`Crack::XML.parse`. If Crack complains about your WSDL document, you should take control and
|
156
|
+
solve the problem instead of getting no response.
|
157
|
+
|
158
|
+
* Improvement: issue [#172](https://github.com/rubiii/savon/issues/172) support for global env_namespace.
|
159
|
+
|
160
|
+
``` ruby
|
161
|
+
Savon.configure do |config|
|
162
|
+
config.env_namespace = :soapenv # changes the default :env namespace
|
163
|
+
end
|
164
|
+
```
|
165
|
+
|
166
|
+
* Fix: [issue #163](https://github.com/rubiii/savon/issues/163) "Savon 0.8.6 not playing nicely
|
167
|
+
with Httpi 0.9.0". Updating HTTPI to v0.9.1 should solve this problem.
|
168
|
+
|
169
|
+
* And if you haven't already seen the new documentation: [savonrb.com](http://savonrb.com)
|
170
|
+
|
171
|
+
## 0.8.6 (2011-02-15)
|
172
|
+
|
173
|
+
* Fix for issues [issue #147](https://github.com/rubiii/savon/issues/147) and [#151](https://github.com/rubiii/savon/issues/151)
|
174
|
+
([771194](https://github.com/rubiii/savon/commit/771194)).
|
175
|
+
|
176
|
+
## 0.8.5 (2011-01-28)
|
177
|
+
|
178
|
+
* Fix for [issue #146](https://github.com/rubiii/savon/issues/146) ([98655c](https://github.com/rubiii/savon/commit/98655c)).
|
179
|
+
|
180
|
+
* Fix for [issue #147](https://github.com/rubiii/savon/issues/147) ([252670](https://github.com/rubiii/savon/commit/252670)).
|
181
|
+
|
182
|
+
## 0.8.4 (2011-01-26)
|
183
|
+
|
184
|
+
* Fix for issues [issue #130](https://github.com/rubiii/savon/issues/130) and [#134](https://github.com/rubiii/savon/issues/134)
|
185
|
+
([4f9847](https://github.com/rubiii/savon/commit/4f9847)).
|
186
|
+
|
187
|
+
* Fix for [issue #91](https://github.com/rubiii/savon/issues/91) ([5c8ec1](https://github.com/rubiii/savon/commit/5c8ec1)).
|
188
|
+
|
189
|
+
* Fix for [issue #135](https://github.com/rubiii/savon/issues/135) ([c9261d](https://github.com/rubiii/savon/commit/c9261d)).
|
190
|
+
|
191
|
+
## 0.8.3 (2011-01-11)
|
192
|
+
|
193
|
+
* Moved implementation of `Savon::SOAP::Response#to_array` to a class method at `Savon::SOAP::XML.to_array`
|
194
|
+
([05a7d3](https://github.com/rubiii/savon/commit/05a7d3)).
|
195
|
+
|
196
|
+
* Fix for [issue #131](https://github.com/rubiii/savon/issues/131) ([4e57b3](https://github.com/rubiii/savon/commit/4e57b3)).
|
197
|
+
|
198
|
+
## 0.8.2 (2011-01-04)
|
199
|
+
|
200
|
+
* Fix for [issue #127](https://github.com/rubiii/savon/issues/127) ([0eb3da](https://github.com/rubiii/savon/commit/0eb3da4)).
|
201
|
+
|
202
|
+
* Changed `Savon::WSSE` to be based on a Hash instead of relying on builder ([4cebc3](https://github.com/rubiii/savon/commit/4cebc3)).
|
203
|
+
|
204
|
+
`Savon::WSSE` now supports wsse:Timestamp headers ([issue #122](https://github.com/rubiii/savon/issues/122)) by setting
|
205
|
+
`Savon::WSSE#timestamp` to `true`:
|
206
|
+
|
207
|
+
client.request :some_method do
|
208
|
+
wsse.timestamp = true
|
209
|
+
end
|
210
|
+
|
211
|
+
or by setting `Savon::WSSE#created_at` or `Savon::WSSE#expires_at`:
|
212
|
+
|
213
|
+
client.request :some_method do
|
214
|
+
wsse.created_at = Time.now
|
215
|
+
wsse.expires_at = Time.now + 60
|
216
|
+
end
|
217
|
+
|
218
|
+
You can also add custom tags to the WSSE header ([issue #69](https://github.com/rubiii/savon/issues/69)):
|
219
|
+
|
220
|
+
client.request :some_method do
|
221
|
+
wsse["wsse:Security"]["wsse:UsernameToken"] = { "Organization" => "ACME", "Domain" => "acme.com" }
|
222
|
+
end
|
223
|
+
|
224
|
+
## 0.8.1 (2010-12-22)
|
225
|
+
|
226
|
+
* Update to depend on HTTPI v0.7.5 which comes with a fallback to use Net::HTTP when no other adapter could be required.
|
227
|
+
|
228
|
+
* Fix for [issue #72](https://github.com/rubiii/savon/issues/72) ([22074a](https://github.com/rubiii/savon/commit/22074a8)).
|
229
|
+
|
230
|
+
* Loosen dependency on builder. Should be quite stable.
|
231
|
+
|
232
|
+
## 0.8.0 (2010-12-20)
|
233
|
+
|
234
|
+
* Added `Savon::SOAP::XML#env_namespace` ([51fa0e](https://github.com/rubiii/savon/commit/51fa0e)) to configure
|
235
|
+
the SOAP envelope namespace. It defaults to :env but can also be set to an empty String for SOAP envelope
|
236
|
+
tags without a namespace.
|
237
|
+
|
238
|
+
* Replaced quite a lot of core extensions by moving the Hash to XML translation into a new gem called
|
239
|
+
[Gyoku](http://rubygems.org/gems/gyoku) ([bac4b4](https://github.com/rubiii/savon/commit/bac4b4)).
|
240
|
+
|
241
|
+
## 0.8.0.beta.4 (2010-11-20)
|
242
|
+
|
243
|
+
* Fix for [issue #107](https://github.com/rubiii/savon/issues/107) ([1d6eda](https://github.com/rubiii/savon/commit/1d6eda)).
|
244
|
+
|
245
|
+
* Fix for [issue #108](https://github.com/rubiii/savon/issues/108)
|
246
|
+
([f64400...0aaca2](https://github.com/rubiii/savon/compare/f64400...0aaca2)) Thanks [fagiani](https://github.com/fagiani).
|
247
|
+
|
248
|
+
* Replaced `Savon.response_pattern` with a slightly different implementation of the `Savon::SOAP::Response#to_array` method
|
249
|
+
([6df6a6](https://github.com/rubiii/savon/commit/6df6a6)). The method now accepts multiple arguments representing the response
|
250
|
+
Hash keys to traverse and returns the result as an Array or an empty Array in case the key is nil or does not exist.
|
251
|
+
|
252
|
+
response.to_array :get_user_response, :return
|
253
|
+
# => [{ :id => 1, :name => "foo"}, { :id => 2, :name => "bar"}]
|
254
|
+
|
255
|
+
## 0.8.0.beta.3 (2010-11-06)
|
256
|
+
|
257
|
+
* Fix for [savon_spec](http://rubygems.org/gems/savon_spec) to not send nil to `Savon::SOAP::XML#body`
|
258
|
+
([c34b42](https://github.com/rubiii/savon/commit/c34b42)).
|
259
|
+
|
260
|
+
## 0.8.0.beta.2 (2010-11-05)
|
261
|
+
|
262
|
+
* Added `Savon.response_pattern` ([0a12fb](https://github.com/rubiii/savon/commit/0a12fb)) to automatically walk deeper into
|
263
|
+
the SOAP response Hash when a pattern (specified as an Array of Regexps and Symbols) matches the response. If for example
|
264
|
+
your response always looks like ".+Response/return" as in:
|
265
|
+
|
266
|
+
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
|
267
|
+
<soap:Body>
|
268
|
+
<ns2:authenticateResponse xmlns:ns2="http://v1_0.ws.user.example.com">
|
269
|
+
<return>
|
270
|
+
<some>thing</some>
|
271
|
+
</return>
|
272
|
+
</ns2:authenticateResponse>
|
273
|
+
</soap:Body>
|
274
|
+
</soap:Envelope>
|
275
|
+
|
276
|
+
you could set the response pattern to:
|
277
|
+
|
278
|
+
Savon.configure do |config|
|
279
|
+
config.response_pattern = [/.+_response/, :return]
|
280
|
+
end
|
281
|
+
|
282
|
+
then instead of calling:
|
283
|
+
|
284
|
+
response.to_hash[:authenticate_response][:return] # :some => "thing"
|
285
|
+
|
286
|
+
to get the actual content, Savon::SOAP::Response#to_hash will try to apply given the pattern:
|
287
|
+
|
288
|
+
response.to_hash # :some => "thing"
|
289
|
+
|
290
|
+
Please notice, that if you don't specify a response pattern or if the pattern doesn't match the
|
291
|
+
response, Savon will behave like it always did.
|
292
|
+
|
293
|
+
* Added `Savon::SOAP::Response#to_array` (which also uses the response pattern).
|
294
|
+
|
295
|
+
## 0.8.0.beta.1 (2010-10-29)
|
296
|
+
|
297
|
+
* Changed `Savon::Client.new` to accept a block instead of multiple Hash arguments. You can access the
|
298
|
+
wsdl, http and wsse objects inside the block to configure your client for a particular service.
|
299
|
+
|
300
|
+
# Instantiating a client to work with a WSDL document
|
301
|
+
client = Savon::Client.new do
|
302
|
+
wsdl.document = "http://example.com?wsdl"
|
303
|
+
end
|
304
|
+
|
305
|
+
# Directly accessing the SOAP endpoint
|
306
|
+
client = Savon::Client.new do
|
307
|
+
wsdl.endpoint = "http://example.com"
|
308
|
+
wsdl.namespace = "http://v1.example.com"
|
309
|
+
end
|
310
|
+
|
311
|
+
* Fix for [issue #77](https://github.com/rubiii/savon/issues/77), which means you can now use
|
312
|
+
local WSDL documents:
|
313
|
+
|
314
|
+
client = Savon::Client.new do
|
315
|
+
wsdl.document = "../wsdl/service.xml"
|
316
|
+
end
|
317
|
+
|
318
|
+
* Changed the way SOAP requests are being dispatched. Instead of using method_missing, you now use
|
319
|
+
the new `request` method, which also accepts a block for you to access the wsdl, http, wsse and
|
320
|
+
soap object. Please notice, that a new soap object is created for every request. So you can only
|
321
|
+
access it inside this block.
|
322
|
+
|
323
|
+
# A simple request to an :authenticate method
|
324
|
+
client.request :authenticate do
|
325
|
+
soap.body = { :id => 1 }
|
326
|
+
end
|
327
|
+
|
328
|
+
* The new `Savon::Client#request` method fixes issues [#37](https://github.com/rubiii/savon/issues/37),
|
329
|
+
[#61](https://github.com/rubiii/savon/issues/61) and [#64](https://github.com/rubiii/savon/issues/64),
|
330
|
+
which report problems with namespacing the SOAP input tag and attaching attributes to it.
|
331
|
+
Some usage examples:
|
332
|
+
|
333
|
+
client.request :get_user # Input tag: <getUser>
|
334
|
+
client.request :wsdl, "GetUser" # Input tag: <wsdl:GetUser>
|
335
|
+
client.request :get_user :active => true # Input tag: <getUser active="true">
|
336
|
+
|
337
|
+
* Savon's new `request` method respects the given namespace. If you don't give it a namespace,
|
338
|
+
Savon will set the target namespace to "xmlns:wsdl". But if you do specify a namespace, it will
|
339
|
+
be set to the given Symbol.
|
340
|
+
|
341
|
+
* Refactored Savon to use the new [HTTPI](http://rubygems.org/gems/httpi) gem.
|
342
|
+
`HTTPI::Request` replaces the `Savon::Request`, so please make sure to have a look
|
343
|
+
at the HTTPI library and let me know about any problems. Using HTTPI actually
|
344
|
+
fixes the following two issues.
|
345
|
+
|
346
|
+
* Savon now adds both "xmlns:xsd" and "xmlns:xsi" namespaces for you. Thanks Averell.
|
347
|
+
It also properly serializes nil values as xsi:nil = "true".
|
348
|
+
|
349
|
+
* Fix for [issue #24](https://github.com/rubiii/savon/issues/24).
|
350
|
+
Instead of Net/HTTP, Savon now uses HTTPI to execute HTTP requests.
|
351
|
+
HTTPI defaults to use HTTPClient which supports HTTP digest authentication.
|
352
|
+
|
353
|
+
* Fix for [issue #76](https://github.com/rubiii/savon/issues/76).
|
354
|
+
You now have to explicitly specify whether to use a WSDL document, when instantiating a client.
|
355
|
+
|
356
|
+
* Fix for [issue #75](https://github.com/rubiii/savon/issues/75).
|
357
|
+
Both `Savon::SOAP::Fault` and `Savon::HTTP::Error` now contain the `HTTPI::Response`.
|
358
|
+
They also inherit from `Savon::Error`, making it easier to rescue both at the same time.
|
359
|
+
|
360
|
+
* Fix for [issue #87](https://github.com/rubiii/savon/issues/87).
|
361
|
+
Thanks to Leonardo Borges.
|
362
|
+
|
363
|
+
* Fix for [issue #81](https://github.com/rubiii/savon/issues/81).
|
364
|
+
Replaced `Savon::WSDL::Document#to_s` with a `to_xml` method.
|
365
|
+
|
366
|
+
* Fix for issues [#85](https://github.com/rubiii/savon/issues/85) and [#88](https://github.com/rubiii/savon/issues/88).
|
367
|
+
|
368
|
+
* Fix for [issue #80](https://github.com/rubiii/savon/issues/80).
|
369
|
+
|
370
|
+
* Fix for [issue #60](https://github.com/rubiii/savon/issues/60).
|
371
|
+
|
372
|
+
* Fix for [issue #96](https://github.com/rubiii/savon/issues/96).
|
373
|
+
|
374
|
+
* Removed global WSSE credentials. Authentication needs to be set up for each client instance.
|
375
|
+
|
376
|
+
* Started to remove quite a few core extensions.
|
377
|
+
|
378
|
+
## 0.7.9 (2010-06-14)
|
379
|
+
|
380
|
+
* Fix for [issue #53](https://github.com/rubiii/savon/issues/53).
|
381
|
+
|
382
|
+
## 0.7.8 (2010-05-09)
|
383
|
+
|
384
|
+
* Fixed gemspec to include missing files in the gem.
|
385
|
+
|
386
|
+
## 0.7.7 (2010-05-09)
|
387
|
+
|
388
|
+
* SOAP requests now start with a proper XML declaration.
|
389
|
+
|
390
|
+
* Added support for gzipped requests and responses (http://github.com/lucascs). While gzipped SOAP
|
391
|
+
responses are decoded automatically, you have to manually instruct Savon to gzip SOAP requests:
|
392
|
+
|
393
|
+
client = Savon::Client.new "http://example.com/UserService?wsdl", :gzip => true
|
394
|
+
|
395
|
+
* Fix for [issue #51](https://github.com/rubiii/savon/issues/51). Added the :soap_endpoint option to
|
396
|
+
`Savon::Client.new` which lets you specify a SOAP endpoint per client instance:
|
397
|
+
|
398
|
+
client = Savon::Client.new "http://example.com/UserService?wsdl",
|
399
|
+
:soap_endpoint => "http://localhost/UserService"
|
400
|
+
|
401
|
+
* Fix for [issue #50](https://github.com/rubiii/savon/issues/50). Savon still escapes special characters
|
402
|
+
in SOAP request Hash values, but you can now append an exclamation mark to Hash keys specifying that
|
403
|
+
it's value should not be escaped.
|
404
|
+
|
405
|
+
## 0.7.6 (2010-03-21)
|
406
|
+
|
407
|
+
* Moved documentation from the Github Wiki to the actual class files and established a much nicer
|
408
|
+
documentation combining examples and implementation (using Hanna) at: http://savon.rubiii.com
|
409
|
+
|
410
|
+
* Added `Savon::Client#call` as a workaround for dispatching calls to SOAP actions named after
|
411
|
+
existing methods. Fix for [issue #48](https://github.com/rubiii/savon/issues/48).
|
412
|
+
|
413
|
+
* Add support for specifying attributes for duplicate tags (via Hash values as Arrays).
|
414
|
+
Fix for [issue #45](https://github.com/rubiii/savon/issues/45).
|
415
|
+
|
416
|
+
* Fix for [issue #41](https://github.com/rubiii/savon/issues/41).
|
417
|
+
|
418
|
+
* Fix for issues [#39](https://github.com/rubiii/savon/issues/39) and [#49](https://github.com/rubiii/savon/issues/49).
|
419
|
+
Added `Savon::SOAP#xml` which let's you specify completely custom SOAP request XML.
|
420
|
+
|
421
|
+
## 0.7.5 (2010-02-19)
|
422
|
+
|
423
|
+
* Fix for [issue #34](https://github.com/rubiii/savon/issues/34).
|
424
|
+
|
425
|
+
* Fix for [issue #36](https://github.com/rubiii/savon/issues/36).
|
426
|
+
|
427
|
+
* Added feature requested in [issue #35](https://github.com/rubiii/savon/issues/35).
|
428
|
+
|
429
|
+
* Changed the key for specifying the order of tags from :@inorder to :order!
|
430
|
+
|
431
|
+
## 0.7.4 (2010-02-02)
|
432
|
+
|
433
|
+
* Fix for [issue #33](https://github.com/rubiii/savon/issues/33).
|
434
|
+
|
435
|
+
## 0.7.3 (2010-01-31)
|
436
|
+
|
437
|
+
* Added support for Geotrust-style WSDL documents (Julian Kornberger <github.corny@digineo.de>).
|
438
|
+
|
439
|
+
* Make HTTP requests include path and query only. This was breaking requests via proxy as scheme and host
|
440
|
+
were repeated (Adrian Mugnolo <adrian@mugnolo.com>)
|
441
|
+
|
442
|
+
* Avoid warning on 1.8.7 and 1.9.1 (Adrian Mugnolo <adrian@mugnolo.com>).
|
443
|
+
|
444
|
+
* Fix for [issue #29](https://github.com/rubiii/savon/issues/29).
|
445
|
+
Default to UTC to xs:dateTime value for WSSE authentication.
|
446
|
+
|
447
|
+
* Fix for [issue #28](https://github.com/rubiii/savon/issues/28).
|
448
|
+
|
449
|
+
* Fix for [issue #27](https://github.com/rubiii/savon/issues/27). The Content-Type now defaults to UTF-8.
|
450
|
+
|
451
|
+
* Modification to allow assignment of an Array with an input name and an optional Hash of values to soap.input.
|
452
|
+
Patches [issue #30](https://github.com/rubiii/savon/issues/30) (stanleydrew <andrewmbenton@gmail.com>).
|
453
|
+
|
454
|
+
* Fix for [issue #25](https://github.com/rubiii/savon/issues/25).
|
455
|
+
|
456
|
+
## 0.7.2 (2010-01-17)
|
457
|
+
|
458
|
+
* Exposed the `Net::HTTP` response (added by Kevin Ingolfsland). Use the `http` accessor (`response.http`)
|
459
|
+
on your `Savon::Response` to access the `Net::HTTP` response object.
|
460
|
+
|
461
|
+
* Fix for [issue #21](https://github.com/rubiii/savon/issues/21).
|
462
|
+
|
463
|
+
* Fix for [issue #22](https://github.com/rubiii/savon/issues/22).
|
464
|
+
|
465
|
+
* Fix for [issue #19](https://github.com/rubiii/savon/issues/19).
|
466
|
+
|
467
|
+
* Added support for global header and namespaces. See [issue #9](https://github.com/rubiii/savon/issues/9).
|
468
|
+
|
469
|
+
## 0.7.1 (2010-01-10)
|
470
|
+
|
471
|
+
* The Hash of HTTP headers for SOAP calls is now public via `Savon::Request#headers`.
|
472
|
+
Patch for [issue #8](https://github.com/rubiii/savon/issues/8).
|
473
|
+
|
474
|
+
## 0.7.0 (2010-01-09)
|
475
|
+
|
476
|
+
This version comes with several changes to the public API!
|
477
|
+
Pay attention to the following list and read the updated Wiki: http://wiki.github.com/rubiii/savon
|
478
|
+
|
479
|
+
* Changed how `Savon::WSDL` can be disabled. Instead of disabling the WSDL globally/per request via two
|
480
|
+
different methods, you now simply append an exclamation mark (!) to your SOAP call: `client.get_all_users!`
|
481
|
+
Make sure you know what you're doing because when the WSDL is disabled, Savon does not know about which
|
482
|
+
SOAP actions are valid and just dispatches everything.
|
483
|
+
|
484
|
+
* The `Net::HTTP` object used by `Savon::Request` to retrieve WSDL documents and execute SOAP calls is now public.
|
485
|
+
While this makes the library even more flexible, it also comes with two major changes:
|
486
|
+
|
487
|
+
* SSL client authentication needs to be defined directly on the `Net::HTTP` object:
|
488
|
+
|
489
|
+
client.request.http.client_cert = ...
|
490
|
+
|
491
|
+
I added a shortcut method for setting all options through a Hash similar to the previous implementation:
|
492
|
+
|
493
|
+
client.request.http.ssl_client_auth :client_cert => ...
|
494
|
+
|
495
|
+
* Open and read timeouts also need to be set on the `Net::HTTP` object:
|
496
|
+
|
497
|
+
client.request.http.open_timeout = 30
|
498
|
+
client.request.http.read_timeout = 30
|
499
|
+
|
500
|
+
* Please refer to the `Net::HTTP` documentation for more details:
|
501
|
+
http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html
|
502
|
+
|
503
|
+
* Thanks to JulianMorrison, Savon now supports HTTP basic authentication:
|
504
|
+
|
505
|
+
client.request.http.basic_auth "username", "password"
|
506
|
+
|
507
|
+
* Julian also added a way to explicitly specify the order of Hash keys and values, so you should now be able
|
508
|
+
to work with services requiring a specific order of input parameters while still using Hash input.
|
509
|
+
|
510
|
+
client.find_user { |soap| soap.body = { :name => "Lucy", :id => 666, :@inorder => [:id, :name] } }
|
511
|
+
|
512
|
+
* `Savon::Response#to_hash` now returns the content inside of "soap:Body" instead of trying to go one
|
513
|
+
level deeper and return it's content. The previous implementation only worked when the "soap:Body" element
|
514
|
+
contained a single child. See [issue #17](https://github.com/rubiii/savon/issues/17).
|
515
|
+
|
516
|
+
* Added `Savon::SOAP#namespace` as a shortcut for setting the "xmlns:wsdl" namespace.
|
517
|
+
|
518
|
+
soap.namespace = "http://example.com"
|
519
|
+
|
520
|
+
## 0.6.8 (2010-01-01)
|
521
|
+
|
522
|
+
* Improved specifications for various kinds of WSDL documents.
|
523
|
+
|
524
|
+
* Added support for SOAP endpoints which are different than the WSDL endpoint of a service.
|
525
|
+
|
526
|
+
* Changed how SOAP actions and inputs are retrieved from the WSDL documents. This might break a few existing
|
527
|
+
implementations, but makes Savon work well with even more services. If this change breaks your implementation,
|
528
|
+
please take a look at the `action` and `input` methods of the `Savon::SOAP` object.
|
529
|
+
One specific problem I know of is working with the createsend WSDL and its namespaced actions.
|
530
|
+
|
531
|
+
To make it work, call the SOAP action without namespace and specify the input manually:
|
532
|
+
|
533
|
+
client.get_api_key { |soap| soap.input = "User.GetApiKey" }
|
534
|
+
|
535
|
+
## 0.6.7 (2009-12-18)
|
536
|
+
|
537
|
+
* Implemented support for a proxy server. The proxy URI can be set through an optional Hash of options passed
|
538
|
+
to instantiating `Savon::Client` (Dave Woodward <dave@futuremint.com>)
|
539
|
+
|
540
|
+
* Implemented support for SSL client authentication. Settings can be set through an optional Hash of arguments
|
541
|
+
passed to instantiating `Savon::Client` (colonhyphenp)
|
542
|
+
|
543
|
+
* Patch for [issue #10](https://github.com/rubiii/savon/issues/10).
|
544
|
+
|
545
|
+
## 0.6.6 (2009-12-14)
|
546
|
+
|
547
|
+
* Default to use the name of the SOAP action (the method called in a client) in lowerCamelCase for SOAP action
|
548
|
+
and input when Savon::WSDL is disabled. You still need to specify soap.action and maybe soap.input in case
|
549
|
+
your SOAP actions are named any different.
|
550
|
+
|
551
|
+
## 0.6.5 (2009-12-13)
|
552
|
+
|
553
|
+
* Added an `open_timeout` method to `Savon::Request`.
|
554
|
+
|
555
|
+
## 0.6.4 (2009-12-13)
|
556
|
+
|
557
|
+
* Refactored specs to be less unit-like.
|
558
|
+
|
559
|
+
* Added a getter for the `Savon::Request` to `Savon::Client` and a `read_timeout` setter for HTTP requests.
|
560
|
+
|
561
|
+
* `wsdl.soap_actions` now returns an Array of SOAP actions. For the previous "mapping" please use `wsdl.operations`.
|
562
|
+
|
563
|
+
* Replaced WSDL document with stream parsing.
|
564
|
+
|
565
|
+
Benchmarks (1000 SOAP calls):
|
566
|
+
|
567
|
+
user system total real
|
568
|
+
0.6.4 72.180000 8.280000 80.460000 (750.799011)
|
569
|
+
0.6.3 192.900000 19.630000 212.530000 (914.031865)
|
570
|
+
|
571
|
+
## 0.6.3 (2009-12-11)
|
572
|
+
|
573
|
+
* Removing 2 ruby deprecation warnings for parenthesized arguments. (Dave Woodward <dave@futuremint.com>)
|
574
|
+
|
575
|
+
* Added global and per request options for disabling `Savon::WSDL`.
|
576
|
+
|
577
|
+
Benchmarks (1000 SOAP calls):
|
578
|
+
|
579
|
+
user system total real
|
580
|
+
WSDL 192.900000 19.630000 212.530000 (914.031865)
|
581
|
+
disabled WSDL 5.680000 1.340000 7.020000 (298.265318)
|
582
|
+
|
583
|
+
* Improved XPath expressions for parsing the WSDL document.
|
584
|
+
|
585
|
+
Benchmarks (1000 SOAP calls):
|
586
|
+
|
587
|
+
user system total real
|
588
|
+
0.6.3 192.900000 19.630000 212.530000 (914.031865)
|
589
|
+
0.6.2 574.720000 78.380000 653.100000 (1387.778539)
|
590
|
+
|
591
|
+
## 0.6.2 (2009-12-06)
|
592
|
+
|
593
|
+
* Added support for changing the name of the SOAP input node.
|
594
|
+
|
595
|
+
* Added a CHANGELOG.
|
596
|
+
|
597
|
+
## 0.6.1 (2009-12-06)
|
598
|
+
|
599
|
+
* Fixed a problem with WSSE credentials, where every request contained a WSSE authentication header.
|
600
|
+
|
601
|
+
## 0.6.0 (2009-12-06)
|
602
|
+
|
603
|
+
* `method_missing` now yields the SOAP and WSSE objects to a given block.
|
604
|
+
|
605
|
+
* The response_process (which previously was a block passed to method_missing) was replaced by `Savon::Response`.
|
606
|
+
|
607
|
+
* Improved SOAP action handling (another problem that came up with issue #1).
|
608
|
+
|
609
|
+
## 0.5.3 (2009-11-30)
|
610
|
+
|
611
|
+
* Patch for [issue #2](https://github.com/rubiii/savon/issues/2).
|
612
|
+
|
613
|
+
## 0.5.2 (2009-11-30)
|
614
|
+
|
615
|
+
* Patch for [issue #1](https://github.com/rubiii/savon/issues/1).
|
616
|
+
|
617
|
+
## 0.5.1 (2009-11-29)
|
618
|
+
|
619
|
+
* Optimized default response process.
|
620
|
+
|
621
|
+
* Added WSSE settings via defaults.
|
622
|
+
|
623
|
+
* Added SOAP fault and HTTP error handling.
|
624
|
+
|
625
|
+
* Improved documentation
|
626
|
+
|
627
|
+
* Added specs
|
628
|
+
|
629
|
+
## 0.5.0 (2009-11-29)
|
630
|
+
|
631
|
+
* Complete rewrite and public release.
|