savon-SU 2.11.1b

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.travis.yml +15 -0
  4. data/.yardopts +6 -0
  5. data/CHANGELOG.md +1098 -0
  6. data/CONTRIBUTING.md +46 -0
  7. data/Gemfile +18 -0
  8. data/LICENSE +20 -0
  9. data/README.md +69 -0
  10. data/Rakefile +14 -0
  11. data/donate.png +0 -0
  12. data/lib/savon.rb +27 -0
  13. data/lib/savon/block_interface.rb +26 -0
  14. data/lib/savon/builder.rb +205 -0
  15. data/lib/savon/client.rb +102 -0
  16. data/lib/savon/core_ext/string.rb +29 -0
  17. data/lib/savon/header.rb +93 -0
  18. data/lib/savon/http_error.rb +27 -0
  19. data/lib/savon/log_message.rb +52 -0
  20. data/lib/savon/message.rb +37 -0
  21. data/lib/savon/mock.rb +5 -0
  22. data/lib/savon/mock/expectation.rb +80 -0
  23. data/lib/savon/mock/spec_helper.rb +62 -0
  24. data/lib/savon/model.rb +84 -0
  25. data/lib/savon/operation.rb +144 -0
  26. data/lib/savon/options.rb +410 -0
  27. data/lib/savon/qualified_message.rb +50 -0
  28. data/lib/savon/request.rb +97 -0
  29. data/lib/savon/request_logger.rb +48 -0
  30. data/lib/savon/response.rb +113 -0
  31. data/lib/savon/soap_fault.rb +50 -0
  32. data/lib/savon/version.rb +3 -0
  33. data/savon-SU.gemspec +46 -0
  34. data/spec/fixtures/gzip/message.gz +0 -0
  35. data/spec/fixtures/response/another_soap_fault.xml +14 -0
  36. data/spec/fixtures/response/authentication.xml +14 -0
  37. data/spec/fixtures/response/f5.xml +39 -0
  38. data/spec/fixtures/response/header.xml +13 -0
  39. data/spec/fixtures/response/list.xml +18 -0
  40. data/spec/fixtures/response/multi_ref.xml +39 -0
  41. data/spec/fixtures/response/soap_fault.xml +8 -0
  42. data/spec/fixtures/response/soap_fault12.xml +18 -0
  43. data/spec/fixtures/response/soap_fault_funky.xml +8 -0
  44. data/spec/fixtures/response/taxcloud.xml +1 -0
  45. data/spec/fixtures/ssl/client_cert.pem +16 -0
  46. data/spec/fixtures/ssl/client_encrypted_key.pem +30 -0
  47. data/spec/fixtures/ssl/client_encrypted_key_cert.pem +24 -0
  48. data/spec/fixtures/ssl/client_key.pem +15 -0
  49. data/spec/fixtures/wsdl/authentication.xml +63 -0
  50. data/spec/fixtures/wsdl/betfair.xml +2981 -0
  51. data/spec/fixtures/wsdl/edialog.xml +15416 -0
  52. data/spec/fixtures/wsdl/interhome.xml +2137 -0
  53. data/spec/fixtures/wsdl/lower_camel.xml +52 -0
  54. data/spec/fixtures/wsdl/multiple_namespaces.xml +92 -0
  55. data/spec/fixtures/wsdl/multiple_types.xml +60 -0
  56. data/spec/fixtures/wsdl/no_message_tag.xml +1267 -0
  57. data/spec/fixtures/wsdl/taxcloud.xml +934 -0
  58. data/spec/fixtures/wsdl/team_software.xml +1 -0
  59. data/spec/fixtures/wsdl/vies.xml +176 -0
  60. data/spec/fixtures/wsdl/wasmuth.xml +153 -0
  61. data/spec/integration/centra_spec.rb +66 -0
  62. data/spec/integration/email_example_spec.rb +32 -0
  63. data/spec/integration/random_quote_spec.rb +23 -0
  64. data/spec/integration/ratp_example_spec.rb +28 -0
  65. data/spec/integration/stockquote_example_spec.rb +28 -0
  66. data/spec/integration/support/application.rb +82 -0
  67. data/spec/integration/support/server.rb +84 -0
  68. data/spec/integration/temperature_example_spec.rb +46 -0
  69. data/spec/integration/zipcode_example_spec.rb +42 -0
  70. data/spec/savon/builder_spec.rb +137 -0
  71. data/spec/savon/client_spec.rb +271 -0
  72. data/spec/savon/core_ext/string_spec.rb +37 -0
  73. data/spec/savon/features/message_tag_spec.rb +61 -0
  74. data/spec/savon/http_error_spec.rb +49 -0
  75. data/spec/savon/log_message_spec.rb +44 -0
  76. data/spec/savon/message_spec.rb +70 -0
  77. data/spec/savon/mock_spec.rb +174 -0
  78. data/spec/savon/model_spec.rb +182 -0
  79. data/spec/savon/observers_spec.rb +92 -0
  80. data/spec/savon/operation_spec.rb +230 -0
  81. data/spec/savon/options_spec.rb +1064 -0
  82. data/spec/savon/qualified_message_spec.rb +20 -0
  83. data/spec/savon/request_logger_spec.rb +37 -0
  84. data/spec/savon/request_spec.rb +496 -0
  85. data/spec/savon/response_spec.rb +270 -0
  86. data/spec/savon/soap_fault_spec.rb +131 -0
  87. data/spec/spec_helper.rb +30 -0
  88. data/spec/support/adapters.rb +48 -0
  89. data/spec/support/endpoint.rb +25 -0
  90. data/spec/support/fixture.rb +39 -0
  91. data/spec/support/integration.rb +9 -0
  92. data/spec/support/stdout.rb +25 -0
  93. metadata +317 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e1091bcce17fcf037d0261c884286fe6e041cfa4
4
+ data.tar.gz: 67e8f81bea048c7585d476308f6f5f10309ac096
5
+ SHA512:
6
+ metadata.gz: 3fc56974b208d0cb77c295edbdbc369e13547b7b631379e24bfc58b70860cd1bb1204da27aa80d6db4517d56b8a1a08af473bc83158c84983954b0f2aa425692
7
+ data.tar.gz: 3da2034cd86743f34fb75290176665701ab022a40c544a2673a93feca50288cb6338fa16c8e19ccbb873632758c42760a2aa4ebdfcc783bfefd151190129a0da
@@ -0,0 +1,14 @@
1
+ .rvmrc
2
+ .DS_Store
3
+ .yardoc
4
+ doc
5
+ rdox
6
+ coverage
7
+ tmp
8
+ *.rbc
9
+ *~
10
+ *.gem
11
+ .bundle
12
+ .rspec
13
+ Gemfile.lock
14
+ bin/
@@ -0,0 +1,15 @@
1
+ # https://github.com/travis-ci/travis-ci/wiki/.travis.yml-options
2
+ language: "ruby"
3
+ script: "bundle exec rake --trace"
4
+ rvm:
5
+ - 2.0
6
+ - 2.1
7
+ - 2.2
8
+ - jruby
9
+ - rbx-2
10
+ matrix:
11
+ allow_failures:
12
+ - rvm: rbx-2
13
+ fast_finish: true
14
+ notifications:
15
+ irc: "irc.freenode.org#savon"
@@ -0,0 +1,6 @@
1
+ --markup markdown
2
+ --markup-provider redcarpet
3
+ -
4
+ CHANGELOG.md
5
+ LICENSE
6
+ lib/**/*.rb
@@ -0,0 +1,1098 @@
1
+ # 2.11.1 (2015-05-27)
2
+
3
+ * Replace dependency on [uuid](https://rubygems.org/gems/uuid), using SecureRandom.uuid instead.
4
+
5
+ # 2.11.0 (2015-03-31)
6
+
7
+ * Formally drop support for 1.8.7.
8
+
9
+ # 2.10.1 (2015-03-15)
10
+
11
+ * Feature: [#673](https://github.com/savonrb/savon/pull/673) Adds an :unwrap option that is passed to Gyoku.
12
+
13
+ # 2.10.0 (2015-03-02)
14
+
15
+ * Fix: This reverts a purported "fix" to operation names.
16
+
17
+ # 2.9.0 (2015-01-29)
18
+
19
+ * Feature: [#655] Wasabi exceptions should be rethrown as Savon errors. This should make it easier to catch errors thrown by Savon::Client.
20
+ * Feature: [#630] ServiceFaults are correctly identified as Soap Faults.
21
+
22
+ # 2.8.0 (2014-11-12)
23
+
24
+ * Feature : [#620](https://github.com/savonrb/savon/pull/620) add #build_request method that builds the actual XML request body, but does not submit it. Useful for debugging, possibly.
25
+ * Fix : Loosened dependencies on Gyoku, Nori, Akami, and other Savon-dependency gems
26
+ * Feature: [#636](https://github.com/savonrb/savon/pull/636) Set HTTPI.logger when Savon's logger is configured.
27
+ * Feature: [#639](https://github.com/savonrb/savon/issues/639) Allow setting any SSL version that OpenSSL provides. See [the relevant HTTPI issue](https://github.com/savonrb/httpi/pull/136) for more information.
28
+
29
+ # 2.7.2 (2014-09-23)
30
+
31
+ Fix : Preserve false values (https://github.com/savonrb/savon/issues/321)
32
+
33
+ # 2.7.1 (2014-09-23)
34
+
35
+ * Fix : Fix a crash in builder when request headers do not contain WSA headers
36
+
37
+ # 2.7.0 (2014-09-23)
38
+
39
+ * Feature: Signing requests. Added wsse_signature.
40
+ ```ruby
41
+ client = Savon.client(wsdl: 'http://service.example.com?wsdl') do
42
+ wsse_signature Akami::WSSE::Signature.new(Akami::WSSE::Certs.new(:cert_file => 'c.pem', :private_key_file => 'p.pem'))
43
+ end
44
+ ```
45
+
46
+ # 2.5.0 (2014-05-03)
47
+
48
+ * Feature: [#573](https://github.com/savonrb/savon/pull/573) Add an `all_operations` method to `Savon::Model` that automatically adds all available operations to the model.
49
+
50
+ * Feature: [#566](https://github.com/savonrb/savon/pull/566) Allow specifying HTTPI adapter per client.
51
+
52
+ ```ruby
53
+ curb_client = Savon.client(wsdl: "http://example.com/service.wsdl", adapter: :curb)
54
+
55
+ http_client = Savon.client(wsdl: "http://example.com/service.wsdl", adapter: :httpclient)
56
+ ```
57
+
58
+ ## 2.4.0 (2014-03-31)
59
+
60
+ * Logging is off by default. To enable this behavior, set the :log option to true
61
+
62
+ ``` ruby
63
+ client = Savon.client(wsdl: "http://example.com/service.wsdl", log: true)
64
+ ```
65
+
66
+ ### 2.3.2 (2013-12-09)
67
+
68
+ * Fix: [#520](https://github.com/savonrb/savon/issues/520) Fixes a regression in message tags in requests and responses.
69
+
70
+ ### 2.3.1 (2013-12-05)
71
+
72
+ * Removed dependency on Nokogiri <= 1.4 -- This improves support for ruby 1.9.3 and 2.0.0 and officially begins the end of support for ruby 1.8.7
73
+ See [issue #487](https://github.com/savonrb/savon/issues/487)
74
+
75
+ ### 2.3.0 (2013-07-27)
76
+
77
+ Combined release ticket: [#481](https://github.com/savonrb/savon/issues/481)
78
+
79
+ * Feature: [#405](https://github.com/savonrb/savon/issues/405) Improved NTLM support based on HTTPI v2.1.0.
80
+
81
+ * Feature: [#424](https://github.com/savonrb/savon/issues/424) Adds support for multipart responses
82
+ through the updated [savon-multipart](https://github.com/savonrb/savon-multipart) gem. You can now
83
+ specify `multipart: true` either as a global or local option. Please make sure you have the
84
+ updated `savon-multipart` gem installed and loaded, as it is not a direct dependency of Savon.
85
+
86
+ ``` ruby
87
+ require 'savon'
88
+ require 'savon-multipart'
89
+
90
+ # expect multipart responses for every operation
91
+ client = Savon.client(wsdl: wsdl, multipart: true)
92
+
93
+ # only expect a multipart response for this operation
94
+ client.call(:my_operation, multipart: true)
95
+ ```
96
+
97
+ * Feature: [#470](https://github.com/savonrb/savon/issues/470) Added a local `:soap_header` option
98
+ to allow setting the SOAP header per request.
99
+
100
+ * Feature: [#402](https://github.com/savonrb/savon/issues/402) Makes it possible to create mocks
101
+ that don't care about the message sent by using `:any` for the `:message` option.
102
+
103
+ ``` ruby
104
+ savon.expects(:authenticate).with(message: :any)
105
+ ```
106
+
107
+ * Fix: [#450](https://github.com/savonrb/savon/pull/450) Added `Savon::Response#soap_fault`
108
+ and `Savon::Response#http_error` which were present in version 1.
109
+
110
+ * Fix: [#474](https://github.com/savonrb/savon/issues/474) Changed `Savon::Response#header` and
111
+ `Savon::Response#body` to respect the global `:convert_response_tags_to` and `:strip_namespaces`
112
+ options and return the expected result instead of raising a `Savon::InvalidResponseError`.
113
+
114
+ * Fix: [#461](https://github.com/savonrb/savon/issues/461) Fixed two problems related to namespace
115
+ qualified messages and the element `:order!`.
116
+
117
+ * Fix: [#476](https://github.com/savonrb/savon/issues/476) fixes a problem where the namespace
118
+ for the message tag was not correctly determined from the WSDL.
119
+
120
+ * Fix: [#468](https://github.com/savonrb/savon/issues/468) Changed the dependency on Nokogiri
121
+ to < 1.6, because Nokogiri 1.6 dropped support for Ruby 1.8.
122
+
123
+ ### 2.2.0 (2013-04-21)
124
+
125
+ * Feature: [#416](https://github.com/savonrb/savon/pull/416) The global `namespace_identifier`
126
+ option can now be set to `nil` to not add a namespace identifier to the message tag.
127
+
128
+ * Feature: [#408](https://github.com/savonrb/savon/pull/408) Added `Savon::Client#service_name`
129
+ to return the name of the SOAP service.
130
+
131
+ * Improvement: When mistyping an option name, Savon used to raise a simple `NoMethodError`.
132
+ This is because regardless of whether you're using the Hash or block syntax to pass global
133
+ or local options, both are just method calls on some options object.
134
+
135
+ ``` ruby
136
+ NoMethodError: undefined method 'wsdk' for #<Savon::GlobalOptions:0x007fed95a55228>
137
+ ```
138
+
139
+ As of this change, Savon now catches those errors and raise a `Savon::UnknownOptionError`
140
+ with a slightly more helpful error message instead.
141
+
142
+ ``` ruby
143
+ Savon::UnknownOptionError:
144
+ Unknown global option: :wsdk
145
+ ```
146
+
147
+ * Improvement: [#385](https://github.com/savonrb/savon/issues/385) Instead of raising an
148
+ `ArgumentError` when Wasabi can't find any operations in the WSDL. Savon now raises a
149
+ `Savon::UnknownOperationError`. This might happen when Wasabi fails to parse the WSDL
150
+ because of imports for example.
151
+
152
+ * Fix: [#430](https://github.com/savonrb/savon/pull/430) allows you to rescue and ignore
153
+ `Savon::Error` errors in production while still having mocks trigger test failures.
154
+
155
+ * Fix: [#393](https://github.com/savonrb/savon/pull/393) changed `Savon::SOAPFault` to work
156
+ with generic response Hash keys.
157
+
158
+ * Fix: [#423](https://github.com/savonrb/savon/issues/423) fixes a problem where Wasabi was
159
+ not able to find extension base elements defined in imports it didn't follow.
160
+
161
+ ### 2.1.0 (2013-02-03)
162
+
163
+ * Feature: [#372](https://github.com/savonrb/savon/pull/372) added global `ssl_cert_key_password` option.
164
+
165
+ * Feature: [#361](https://github.com/savonrb/savon/issues/361) added the local `:attributes`
166
+ option to allow adding XML attributes to the SOAP message tag.
167
+
168
+ * Improvement: [#363](https://github.com/savonrb/savon/issues/363) Savon 2.0 remembers the cookies from
169
+ the last response and passes it to the next request, which is not a proper way to handle cookies.
170
+ I removed this behavior and introduced an easy way to handle cookies manually instead.
171
+
172
+ * Improvement: [#380](https://github.com/savonrb/savon/pull/380) changed the gemspec to not rely on git.
173
+
174
+ * Fix: [#378](https://github.com/savonrb/savon/pull/378) use the proxy option for WSDL requests.
175
+
176
+ * Fix: [#369](https://github.com/savonrb/savon/pull/369) use HTTP basic and digest authentication
177
+ credentials to retrieve WSDL files.
178
+ Fixes [#367](https://github.com/savonrb/savon/issues/367#issuecomment-12720307).
179
+
180
+ * Fix: [#349](https://github.com/savonrb/savon/issues/349) global timeout and SSL options are
181
+ now used to retrieve a remote WSDL document.
182
+
183
+ * Fix: [#353](https://github.com/savonrb/savon/issues/353) simplified logging. the global `:log`
184
+ option is now only used to store whether Savon should log instead of creating a new `Logger`
185
+ and changing its logdev to `$stdout` or `/dev/null` depending on the what was passed.
186
+
187
+ This also fixes [rubiii/savon#2](https://github.com/rubiii/savon/issues/2) and
188
+ [#379](https://github.com/savonrb/savon/issues/379).
189
+
190
+ * Fix: [#376](https://github.com/savonrb/savon/issues/376) added a global `namespaces` option
191
+ for adding namespaces to the SOAP envelope.
192
+
193
+ ### 2.0.3 (2013-01-19)
194
+
195
+ * Upgraded Nori dependency to prevent people from using a version that is vulnerable to
196
+ the recent [remote code execution bug](https://gist.github.com/4532291).
197
+
198
+ ### 2.0.2 (2012-12-20)
199
+
200
+ * Fix: [#297](https://github.com/savonrb/savon/issues/297#issuecomment-11536517) added the global
201
+ `:ssl_verify_mode` and `:ssl_version` options which were missing.
202
+
203
+ * Fix: [#344](https://github.com/savonrb/savon/issues/344) added missing global ssl cert options
204
+ `:ssl_cert_file`, `:ssl_cert_key_file` and `:ssl_ca_cert_file`.
205
+
206
+ ### 2.0.1 (2012-12-19)
207
+
208
+ * Fix [#342](https://github.com/savonrb/savon/issues/342) fixes an issue where namespaces could
209
+ not be resolved if the actual operation name to call did not match the operation name passed
210
+ to the client's `#call` method. For example: `:get_stations` for a `getStations` operation.
211
+
212
+ ### 2.0.0 (2012-12-18)
213
+
214
+ * Read about all the changes in the [updated documentation](http://savonrb.com/version2.html).
215
+
216
+ * Fix: [#322](https://github.com/savonrb/savon/issues/322) use the builder's state instead of the
217
+ block's return value to set the soap body/xml values.
218
+
219
+ * Fix: [#327](https://github.com/savonrb/savon/issues/327) `response.to_array` now properly
220
+ returns FalseClass values.
221
+
222
+ * Fix: [320](https://github.com/savonrb/savon/issues/320) use the correct SOAP namespace when the
223
+ SOAP version changes between requests.
224
+
225
+ * Fix: [321](https://github.com/savonrb/savon/issues/321) preserve `[false]` values in Hashes.
226
+
227
+ ### 1.2.0 (2012-09-15)
228
+
229
+ * Fix: [#312](https://github.com/savonrb/savon/pull/312) recursively determines the proper namespaces
230
+ for SOAP body Hashes with nested Arrays of Hashes.
231
+
232
+ * Improvement: [#318](https://github.com/savonrb/savon/pull/318) isolates building the request to
233
+ improve threadsafety.
234
+
235
+ * Refactoring: Use the `Wasabi::Document` with resolver instead of the custom `Savon::Wasabi::Document`.
236
+
237
+ ### 1.1.0 (2012-06-28)
238
+
239
+ * Improvement: Changed Savon's core dependencies to be more strict and only allow bug fix changes.
240
+ Major or minor releases of these dependencies now need a release of Savon so they can be used.
241
+ This should improve the stability of the library and make it easier to update, because changes
242
+ to these core dependencies will be documented here as well.
243
+
244
+ * Fix: The latest version of Wasabi should now correctly detect the names of your operations.
245
+ So you should be able to just get the names of some operation:
246
+
247
+ ``` ruby
248
+ client.wsdl.soap_actions
249
+ # => [:authenticate, :find_user]
250
+ ```
251
+
252
+ and pass the Symbol to execute a request:
253
+
254
+ ``` ruby
255
+ client.request :authenticate, body: { token: "secret" }
256
+ ```
257
+
258
+ If you still pass anything other than a single Symbol to that method, please open an issue!
259
+ You shouldn't need to specify a namespace or additional attributes for the tag.
260
+
261
+ * Refactoring: Moved code that sets the cookies from the last response for the
262
+ next request to `HTTPI::Request#set_cookies`.
263
+
264
+ ### 1.0.0 (2012-06-09)
265
+
266
+ * Fix: `Savon.client` didn't pass the optional block.
267
+
268
+ * Improvement: [#291](https://github.com/savonrb/savon/issues/291) changed the `:soap_request` hook to act
269
+ like an around filter. The hook now receives a callback block to execute the SOAP call and can return
270
+ the result of the callback to continue the request. It can also not call the callback block and return
271
+ some `HTTPI::Response` to mock the SOAP request.
272
+
273
+ As this change affects `savon_spec`, you need to update `savon_spec` to v1.3.0.
274
+
275
+ ### 0.9.14 (2012-06-07)
276
+
277
+ * Fix: [#292](https://github.com/savonrb/savon/issues/292) again
278
+
279
+ ### 0.9.13 (2012-06-07)
280
+
281
+ * Fix: [#292](https://github.com/savonrb/savon/issues/292)
282
+
283
+ ### 0.9.12 (2012-06-07)
284
+
285
+ * Re-added the log method setters to the new config object for backwards compatibility.
286
+ You should be able to configure the logger as you used to do.
287
+
288
+ ``` ruby
289
+ Savon.configure do |config|
290
+ config.log = false # disable logging
291
+ config.log_level = :info # changing the log level
292
+ config.logger = Rails.logger # using the Rails logger
293
+ end
294
+ ```
295
+
296
+ ### 0.9.11 (2012-06-06)
297
+
298
+ * Feature: [#264](https://github.com/savonrb/savon/pull/264) - Thanks to @hoverlover, Savon and Akami now support
299
+ signed messages through WSSE.
300
+
301
+ * Fix: [#275](https://github.com/savonrb/savon/pull/275) - Add namespaces to keys in both the SOAP body hash as well
302
+ as any keys specified in a :order! Array instead of having to define them manually.
303
+
304
+ * Fix: [#257](https://github.com/savonrb/savon/issues/257) - Add ability to accept and send multiple cookies.
305
+
306
+ * Improvement: [#277](https://github.com/savonrb/savon/pull/277) automatically namespace the SOAP input tag.
307
+ Here's an example from the pull request:
308
+
309
+ ``` ruby
310
+ client.request :authenticate
311
+ ```
312
+
313
+ Note the automatic namespace identifier on the authenticate element, as well as the proper namespace inclusion
314
+ in the document:
315
+
316
+ ``` xml
317
+ <env:Envelope
318
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
319
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
320
+ xmlns:tns="http://v1_0.ws.auth.order.example.com/"
321
+ xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
322
+
323
+ <tns:authenticate>
324
+ <tns:user>username</tns:user>
325
+ <tns:password>password</tns:password>
326
+ </tns:authenticate>
327
+ </env:Envelope>
328
+ ```
329
+
330
+ ### 0.9.10 (2012-06-06)
331
+
332
+ * Feature: [#289](https://github.com/savonrb/savon/pull/289) - Allow the SOAP envelope header to be set as a String.
333
+
334
+ * Feature: In addition to the global configuration, there's now also one configuration per client.
335
+ The global config is cloned when a new client is initialized and gets used instead of the global one.
336
+ In addition, for `Savon::Model` classes, the config is cloned per class.
337
+
338
+ Closes [#84](https://github.com/savonrb/savon/issues/84) by allowing one logger per client and
339
+ [#270](https://github.com/savonrb/savon/issues/270) by allowing to specify error handling per client.
340
+
341
+ * Feature: Added an option to pretty print XML in log messages. Closes [#256](https://github.com/savonrb/savon/issues/256)
342
+ and [#280](https://github.com/savonrb/savon/issues/280).
343
+
344
+ ``` ruby
345
+ # global
346
+ Savon.configure do |config|
347
+ config.pretty_print_xml = true
348
+ end
349
+
350
+ # per client
351
+ client.config.pretty_print_xml = true
352
+ ```
353
+
354
+ * Refactoring:
355
+ * Added `Savon.client` as a shortcut for creating a new `Savon::Client`
356
+ * Changed `Savon::Config` from a module to a class.
357
+ * Moved logging to the new `Savon::Logger` object.
358
+ * Removed the `blank?` extension from `Object`.
359
+
360
+ ### 0.9.9 (2012-02-17)
361
+
362
+ * Improvement: [pull request 255](https://github.com/savonrb/savon/pull/255) - Raise an error if fetching
363
+ a remote WSDL fails. Possible fix for [issue 236](https://github.com/savonrb/savon/issues/236).
364
+
365
+ * Improvement: The value for elementFormDefault (:unqualified, :qualified) can now be specified when creating
366
+ a `Savon::Client`. For example:
367
+
368
+ ``` ruby
369
+ Savon::Client.new do
370
+ wsdl.element_form_default = :unqualified
371
+ end
372
+ ```
373
+
374
+ * Improvement: [pull request 263](https://github.com/savonrb/savon/pull/263) - The SOAP action can now be set
375
+ via a `:soap_action` key passed to the `#request` method.
376
+
377
+ ``` ruby
378
+ client.request(:get_user, :soap_action => :test_action)
379
+ ```
380
+
381
+ * Fix: [pull request 265](https://github.com/savonrb/savon/pull/265) - Fixes gemspec problems when bundling
382
+ under JRuby 1.6.5. Also fixes [issue 267](https://github.com/savonrb/savon/issues/267).
383
+
384
+ ### 0.9.8 (2012-02-15)
385
+
386
+ * Feature: Savon now ships with [Savon::Model](http://rubygems.org/gems/savon_model).
387
+ Savon::Model is a lightweight DSL to be used inside your domain models. It's been refactored
388
+ and is now [even more useful](http://savonrb.com/#how_to_date_a_model) than before.
389
+
390
+ * Feature: Merged [pull request 230](https://github.com/savonrb/savon/pull/230) to allow filtering values
391
+ in logged SOAP request XML messages.
392
+
393
+ ``` ruby
394
+ Savon.configure do |config|
395
+ config.log_filter = ["password"]
396
+ end
397
+ ```
398
+
399
+ * Feature: Added an option to change the default encoding of the XML directive tag (defaults to UTF-8)
400
+ to fix [issue 234](https://github.com/savonrb/savon/issues/234).
401
+
402
+ ``` ruby
403
+ client.request(:find_user) do
404
+ soap.encoding = "UTF-16"
405
+ soap.body = { :id => 1 }
406
+ end
407
+ ```
408
+
409
+ * Improvement: Merged [pull request 231](https://github.com/savonrb/savon/pull/231) to gracefully handle
410
+ invalid response bodies by throwing a `Savon::SOAP::InvalidResponseError`.
411
+
412
+ * Fix: [issue 237](https://github.com/savonrb/savon/issues/237) - Set the Content-Type and Content-Length
413
+ headers for every request.
414
+
415
+ * Fix: [pull request 250](https://github.com/savonrb/savon/pull/250) - The Content-Length header should
416
+ be the size in bytes.
417
+
418
+ ### 0.9.7 (2011-08-25)
419
+
420
+ * Feature: Merged [pull request 210](https://github.com/savonrb/savon/pull/210) by
421
+ [mboeh](https://github.com/mboeh) to add `Savon::SOAP::Response#doc` and
422
+ `Savon::SOAP::Response#xpath`.
423
+
424
+ * Feature: Merged [pull request 211](https://github.com/savonrb/savon/pull/211) by
425
+ [mattkirman](https://github.com/mattkirman) to fix [issue 202](https://github.com/savonrb/savon/issues/202).
426
+
427
+ * Feature: You can now pass a block to `Savon::SOAP::XML#body` and use Builder to create the XML:
428
+
429
+ ``` ruby
430
+ client.request(:find) do
431
+ soap.body do |xml|
432
+ xml.user do
433
+ xml.id 601173
434
+ end
435
+ end
436
+ end
437
+ ```
438
+
439
+ * Fix: [issue 218](https://github.com/savonrb/savon/pull/218) - Savon now correctly handles namespaced
440
+ Array items in a Hash passed to `Savon::SOAP::XML#body=`.
441
+
442
+ * Fix: Merged [pull request 212](https://github.com/savonrb/savon/pull/212) to fix
443
+ [savon_spec issue 2](https://github.com/savonrb/savon_spec/issues/2).
444
+
445
+ * Improvement: [issue 222](https://github.com/savonrb/savon/issues/222) - Set the Content-Length header.
446
+
447
+ ### 0.9.6 (2011-07-07)
448
+
449
+ * Improvement/Fix: Updated Savon to use the latest version of [Wasabi](http://rubygems.org/gems/wasabi).
450
+ This should fix [issue 155](https://github.com/savonrb/savon/issues/155) - Savon can automatically add namespaces
451
+ to SOAP requests based on the WSDL. Users shouldn't need to do anything differently or even notice whether their WSDL
452
+ hits this case; the intention is that this will "Just Work" and follow the WSDL. The SOAP details are that if
453
+ elementFormDefault is specified as qualified, Savon will automatically prepend the correct XML namespaces to the
454
+ elements in a SOAP request. Thanks to [jkingdon](https://github.com/jkingdon) for this.
455
+
456
+ * Fix: [issue 143](https://github.com/savonrb/savon/issues/143) - Updating Wasabi should solve this issue.
457
+
458
+ ### 0.9.5 (2011-07-03)
459
+
460
+ * Refactoring: Extracted WSSE authentication out into the [akami](http://rubygems.org/gems/akami) gem.
461
+
462
+ ### 0.9.4 (2011-07-03)
463
+
464
+ * Refactoring: Extracted the WSDL parser out into the [wasabi](http://rubygems.org/gems/wasabi) gem.
465
+ This should isolate upcoming improvements to the parser.
466
+
467
+ ### 0.9.3 (2011-06-30)
468
+
469
+ * Fix: [issue 138](https://github.com/savonrb/savon/issues/138) -
470
+ Savon now supports setting a global SOAP header via `Savon.soap_header=`.
471
+
472
+ * Fixed the namespace for wsse message timestamps from `wsse:Timestamp`
473
+ to `wsu:Timestamp` as required by the specification.
474
+
475
+ * Change: Removed support for NTLM authentication until it's stable. If you need it, you can still
476
+ add the following line to your Gemfile:
477
+
478
+ ``` ruby
479
+ gem "httpi", "0.9.4"
480
+ ```
481
+
482
+ * Refactoring:
483
+
484
+ * `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).
485
+ Along with replacing core extensions with a proper implementation, Nori now contains a number of methods
486
+ for [configuring its default behavior](https://github.com/savonrb/nori/blob/master/CHANGELOG.md):
487
+
488
+ * The option whether to strip namespaces was moved to Nori.strip_namespaces
489
+ * You can disable "advanced typecasting" for SOAP response values
490
+ * And you can configure how SOAP response keys should be converted
491
+
492
+ * `Savon::SOAP::XML.to_hash`, `Savon::SOAP::XML.parse` and `Savon::SOAP::XML.to_array` are gone.
493
+ It wasn't worth keeping them around, because they didn't do much. You can simply parse a SOAP
494
+ response and translate it to a Savon SOAP response Hash via:
495
+
496
+ ``` ruby
497
+ Nori.parse(xml)[:envelope][:body]
498
+ ```
499
+
500
+ * `Savon::SOAP::Response#basic_hash` is now `Savon::SOAP::Response#hash`.
501
+
502
+ ### 0.9.2 (2011-04-30)
503
+
504
+ * Fix: [issue 154](https://github.com/savonrb/savon/pull/154) -
505
+ Timezone format used by Savon now matches the XML schema spec.
506
+
507
+ * Improvement: WSSE basic, digest and timestamp authentication are no longer mutually exclusive.
508
+ Thanks to [mleon](https://github.com/mleon) for solving [issue #142](https://github.com/savonrb/savon/issues/142).
509
+
510
+ * Improvement: Switched from using Crack to translate the SOAP response to a Hash to using
511
+ [Nori](http://rubygems.org/gems/nori). It's based on Crack and comes with pluggable parsers.
512
+ It defaults to REXML, but you can switch to Nokogiri via:
513
+
514
+ ``` ruby
515
+ Nori.parser = :nokogiri
516
+ ```
517
+
518
+ * Improvement: WSDL parsing now uses Nokogiri instead of REXML.
519
+
520
+ ### 0.9.1 (2011-04-06)
521
+
522
+ * Improvement: if you're only setting the local or remote address of your wsdl document, you can
523
+ now pass an (optional) String to `Savon::Client.new` to set `wsdl.document`.
524
+
525
+ ``` ruby
526
+ Savon::Client.new "http://example.com/UserService?wsdl"
527
+ ```
528
+
529
+ * Improvement: instead of calling the `to_hash` method of your response again and again and again,
530
+ there is now a `#[]` shortcut for you.
531
+
532
+ ``` ruby
533
+ response[:authenticate_response][:return]
534
+ ```
535
+
536
+ ### 0.9.0 (2011-04-05)
537
+
538
+ * Feature: issues [#158](https://github.com/savonrb/savon/issues/158),
539
+ [#169](https://github.com/savonrb/savon/issues/169) and [#172](https://github.com/savonrb/savon/issues/172)
540
+ configurable "Hash key Symbol to lowerCamelCase" conversion by using the latest version of
541
+ [Gyoku](http://rubygems.org/gems/gyoku).
542
+
543
+ ``` ruby
544
+ Gyoku.convert_symbols_to(:camelcase)
545
+ Gyoku.xml(:first_name => "Mac") # => "<FirstName></Firstname>"
546
+ ```
547
+
548
+ You can even define your own conversion formular.
549
+
550
+ ``` ruby
551
+ Gyoku.convert_symbols_to { |key| key.upcase }
552
+ Gyoku.xml(:first_name => "Mac") # => "<FIRST_NAME></FIRST_NAME>"
553
+ ```
554
+
555
+ This should also work for the SOAP input tag and SOAPAction header. So if you had to use a String for
556
+ the SOAP action to call because your services uses CamelCase instead of lowerCamelCase, you can now
557
+ change the default and use Symbols instead.
558
+
559
+ ``` ruby
560
+ Gyoku.convert_symbols_to(:camelcase)
561
+
562
+ # pre Gyoku 0.4.0
563
+ client.request(:get_user) # => "<getUser/>
564
+ client.request("GetUser") # => "<GetUser/>"
565
+
566
+ # post Gyoku 0.4.0
567
+ client.request(:get_user) # => "<GetUser/>"
568
+ ```
569
+
570
+ * Improvement: issues [#170](https://github.com/savonrb/savon/issues/170) and
571
+ [#173](https://github.com/savonrb/savon/issues/173) Savon no longer rescues exceptions raised by
572
+ `Crack::XML.parse`. If Crack complains about your WSDL document, you should take control and
573
+ solve the problem instead of getting no response.
574
+
575
+ * Improvement: issue [#172](https://github.com/savonrb/savon/issues/172) support for global env_namespace.
576
+
577
+ ``` ruby
578
+ Savon.configure do |config|
579
+ config.env_namespace = :soapenv # changes the default :env namespace
580
+ end
581
+ ```
582
+
583
+ * Fix: [issue #163](https://github.com/savonrb/savon/issues/163) "Savon 0.8.6 not playing nicely
584
+ with Httpi 0.9.0". Updating HTTPI to v0.9.1 should solve this problem.
585
+
586
+ * And if you haven't already seen the new documentation: [savonrb.com](http://savonrb.com)
587
+
588
+ ### 0.8.6 (2011-02-15)
589
+
590
+ * Fix for issues [issue #147](https://github.com/savonrb/savon/issues/147) and [#151](https://github.com/savonrb/savon/issues/151)
591
+ ([771194](https://github.com/savonrb/savon/commit/771194)).
592
+
593
+ ### 0.8.5 (2011-01-28)
594
+
595
+ * Fix for [issue #146](https://github.com/savonrb/savon/issues/146) ([98655c](https://github.com/savonrb/savon/commit/98655c)).
596
+
597
+ * Fix for [issue #147](https://github.com/savonrb/savon/issues/147) ([252670](https://github.com/savonrb/savon/commit/252670)).
598
+
599
+ ### 0.8.4 (2011-01-26)
600
+
601
+ * Fix for issues [issue #130](https://github.com/savonrb/savon/issues/130) and [#134](https://github.com/savonrb/savon/issues/134)
602
+ ([4f9847](https://github.com/savonrb/savon/commit/4f9847)).
603
+
604
+ * Fix for [issue #91](https://github.com/savonrb/savon/issues/91) ([5c8ec1](https://github.com/savonrb/savon/commit/5c8ec1)).
605
+
606
+ * Fix for [issue #135](https://github.com/savonrb/savon/issues/135) ([c9261d](https://github.com/savonrb/savon/commit/c9261d)).
607
+
608
+ ### 0.8.3 (2011-01-11)
609
+
610
+ * Moved implementation of `Savon::SOAP::Response#to_array` to a class method at `Savon::SOAP::XML.to_array`
611
+ ([05a7d3](https://github.com/savonrb/savon/commit/05a7d3)).
612
+
613
+ * Fix for [issue #131](https://github.com/savonrb/savon/issues/131) ([4e57b3](https://github.com/savonrb/savon/commit/4e57b3)).
614
+
615
+ ### 0.8.2 (2011-01-04)
616
+
617
+ * Fix for [issue #127](https://github.com/savonrb/savon/issues/127) ([0eb3da](https://github.com/savonrb/savon/commit/0eb3da4)).
618
+
619
+ * Changed `Savon::WSSE` to be based on a Hash instead of relying on builder ([4cebc3](https://github.com/savonrb/savon/commit/4cebc3)).
620
+
621
+ `Savon::WSSE` now supports wsse:Timestamp headers ([issue #122](https://github.com/savonrb/savon/issues/122)) by setting
622
+ `Savon::WSSE#timestamp` to `true`:
623
+
624
+ ``` ruby
625
+ client.request :some_method do
626
+ wsse.timestamp = true
627
+ end
628
+ ```
629
+
630
+ or by setting `Savon::WSSE#created_at` or `Savon::WSSE#expires_at`:
631
+
632
+ ``` ruby
633
+ client.request :some_method do
634
+ wsse.created_at = Time.now
635
+ wsse.expires_at = Time.now + 60
636
+ end
637
+ ```
638
+
639
+ You can also add custom tags to the WSSE header ([issue #69](https://github.com/savonrb/savon/issues/69)):
640
+
641
+ ``` ruby
642
+ client.request :some_method do
643
+ wsse["wsse:Security"]["wsse:UsernameToken"] = { "Organization" => "ACME", "Domain" => "acme.com" }
644
+ end
645
+ ```
646
+
647
+ ### 0.8.1 (2010-12-22)
648
+
649
+ * Update to depend on HTTPI v0.7.5 which comes with a fallback to use Net::HTTP when no other adapter could be required.
650
+
651
+ * Fix for [issue #72](https://github.com/savonrb/savon/issues/72) ([22074a](https://github.com/savonrb/savon/commit/22074a8)).
652
+
653
+ * Loosen dependency on builder. Should be quite stable.
654
+
655
+ ### 0.8.0 (2010-12-20)
656
+
657
+ * Added `Savon::SOAP::XML#env_namespace` ([51fa0e](https://github.com/savonrb/savon/commit/51fa0e)) to configure
658
+ the SOAP envelope namespace. It defaults to :env but can also be set to an empty String for SOAP envelope
659
+ tags without a namespace.
660
+
661
+ * Replaced quite a lot of core extensions by moving the Hash to XML translation into a new gem called
662
+ [Gyoku](http://rubygems.org/gems/gyoku) ([bac4b4](https://github.com/savonrb/savon/commit/bac4b4)).
663
+
664
+ ### 0.8.0.beta.4 (2010-11-20)
665
+
666
+ * Fix for [issue #107](https://github.com/savonrb/savon/issues/107) ([1d6eda](https://github.com/savonrb/savon/commit/1d6eda)).
667
+
668
+ * Fix for [issue #108](https://github.com/savonrb/savon/issues/108)
669
+ ([f64400...0aaca2](https://github.com/savonrb/savon/compare/f64400...0aaca2)) Thanks [fagiani](https://github.com/fagiani).
670
+
671
+ * Replaced `Savon.response_pattern` with a slightly different implementation of the `Savon::SOAP::Response#to_array` method
672
+ ([6df6a6](https://github.com/savonrb/savon/commit/6df6a6)). The method now accepts multiple arguments representing the response
673
+ 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.
674
+
675
+ ``` ruby
676
+ response.to_array :get_user_response, :return
677
+ # => [{ :id => 1, :name => "foo"}, { :id => 2, :name => "bar"}]
678
+ ```
679
+
680
+ ### 0.8.0.beta.3 (2010-11-06)
681
+
682
+ * Fix for [savon_spec](http://rubygems.org/gems/savon_spec) to not send nil to `Savon::SOAP::XML#body`
683
+ ([c34b42](https://github.com/savonrb/savon/commit/c34b42)).
684
+
685
+ ### 0.8.0.beta.2 (2010-11-05)
686
+
687
+ * Added `Savon.response_pattern` ([0a12fb](https://github.com/savonrb/savon/commit/0a12fb)) to automatically walk deeper into
688
+ the SOAP response Hash when a pattern (specified as an Array of Regexps and Symbols) matches the response. If for example
689
+ your response always looks like ".+Response/return" as in:
690
+
691
+ ``` xml
692
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
693
+ <soap:Body>
694
+ <ns2:authenticateResponse xmlns:ns2="http://v1_0.ws.user.example.com">
695
+ <return>
696
+ <some>thing</some>
697
+ </return>
698
+ </ns2:authenticateResponse>
699
+ </soap:Body>
700
+ </soap:Envelope>
701
+ ```
702
+
703
+ you could set the response pattern to:
704
+
705
+ ``` ruby
706
+ Savon.configure do |config|
707
+ config.response_pattern = [/.+_response/, :return]
708
+ end
709
+ ```
710
+
711
+ then instead of calling:
712
+
713
+ ``` ruby
714
+ response.to_hash[:authenticate_response][:return] # :some => "thing"
715
+ ```
716
+
717
+ to get the actual content, Savon::SOAP::Response#to_hash will try to apply given the pattern:
718
+
719
+ ``` ruby
720
+ response.to_hash # :some => "thing"
721
+ ```
722
+
723
+ Please notice, that if you don't specify a response pattern or if the pattern doesn't match the
724
+ response, Savon will behave like it always did.
725
+
726
+ * Added `Savon::SOAP::Response#to_array` (which also uses the response pattern).
727
+
728
+ ### 0.8.0.beta.1 (2010-10-29)
729
+
730
+ * Changed `Savon::Client.new` to accept a block instead of multiple Hash arguments. You can access the
731
+ wsdl, http and wsse objects inside the block to configure your client for a particular service.
732
+
733
+ ``` ruby
734
+ # Instantiating a client to work with a WSDL document
735
+ client = Savon::Client.new do
736
+ wsdl.document = "http://example.com?wsdl"
737
+ end
738
+ ```
739
+
740
+ ``` ruby
741
+ # Directly accessing the SOAP endpoint
742
+ client = Savon::Client.new do
743
+ wsdl.endpoint = "http://example.com"
744
+ wsdl.namespace = "http://v1.example.com"
745
+ end
746
+ ```
747
+
748
+ * Fix for [issue #77](https://github.com/savonrb/savon/issues/77), which means you can now use
749
+ local WSDL documents:
750
+
751
+ ``` ruby
752
+ client = Savon::Client.new do
753
+ wsdl.document = "../wsdl/service.xml"
754
+ end
755
+ ```
756
+
757
+ * Changed the way SOAP requests are being dispatched. Instead of using method_missing, you now use
758
+ the new `request` method, which also accepts a block for you to access the wsdl, http, wsse and
759
+ soap object. Please notice, that a new soap object is created for every request. So you can only
760
+ access it inside this block.
761
+
762
+ ``` ruby
763
+ # A simple request to an :authenticate method
764
+ client.request :authenticate do
765
+ soap.body = { :id => 1 }
766
+ end
767
+ ```
768
+
769
+ * The new `Savon::Client#request` method fixes issues [#37](https://github.com/savonrb/savon/issues/37),
770
+ [#61](https://github.com/savonrb/savon/issues/61) and [#64](https://github.com/savonrb/savon/issues/64),
771
+ which report problems with namespacing the SOAP input tag and attaching attributes to it.
772
+ Some usage examples:
773
+
774
+ ``` ruby
775
+ client.request :get_user # Input tag: <getUser>
776
+ client.request :wsdl, "GetUser" # Input tag: <wsdl:GetUser>
777
+ client.request :get_user :active => true # Input tag: <getUser active="true">
778
+ ```
779
+
780
+ * Savon's new `request` method respects the given namespace. If you don't give it a namespace,
781
+ Savon will set the target namespace to "xmlns:wsdl". But if you do specify a namespace, it will
782
+ be set to the given Symbol.
783
+
784
+ * Refactored Savon to use the new [HTTPI](http://rubygems.org/gems/httpi) gem.
785
+ `HTTPI::Request` replaces the `Savon::Request`, so please make sure to have a look
786
+ at the HTTPI library and let me know about any problems. Using HTTPI actually
787
+ fixes the following two issues.
788
+
789
+ * Savon now adds both "xmlns:xsd" and "xmlns:xsi" namespaces for you. Thanks Averell.
790
+ It also properly serializes nil values as xsi:nil = "true".
791
+
792
+ * Fix for [issue #24](https://github.com/savonrb/savon/issues/24).
793
+ Instead of Net/HTTP, Savon now uses HTTPI to execute HTTP requests.
794
+ HTTPI defaults to use HTTPClient which supports HTTP digest authentication.
795
+
796
+ * Fix for [issue #76](https://github.com/savonrb/savon/issues/76).
797
+ You now have to explicitly specify whether to use a WSDL document, when instantiating a client.
798
+
799
+ * Fix for [issue #75](https://github.com/savonrb/savon/issues/75).
800
+ Both `Savon::SOAP::Fault` and `Savon::HTTP::Error` now contain the `HTTPI::Response`.
801
+ They also inherit from `Savon::Error`, making it easier to rescue both at the same time.
802
+
803
+ * Fix for [issue #87](https://github.com/savonrb/savon/issues/87).
804
+ Thanks to Leonardo Borges.
805
+
806
+ * Fix for [issue #81](https://github.com/savonrb/savon/issues/81).
807
+ Replaced `Savon::WSDL::Document#to_s` with a `to_xml` method.
808
+
809
+ * Fix for issues [#85](https://github.com/savonrb/savon/issues/85) and [#88](https://github.com/savonrb/savon/issues/88).
810
+
811
+ * Fix for [issue #80](https://github.com/savonrb/savon/issues/80).
812
+
813
+ * Fix for [issue #60](https://github.com/savonrb/savon/issues/60).
814
+
815
+ * Fix for [issue #96](https://github.com/savonrb/savon/issues/96).
816
+
817
+ * Removed global WSSE credentials. Authentication needs to be set up for each client instance.
818
+
819
+ * Started to remove quite a few core extensions.
820
+
821
+ ### 0.7.9 (2010-06-14)
822
+
823
+ * Fix for [issue #53](https://github.com/savonrb/savon/issues/53).
824
+
825
+ ### 0.7.8 (2010-05-09)
826
+
827
+ * Fixed gemspec to include missing files in the gem.
828
+
829
+ ### 0.7.7 (2010-05-09)
830
+
831
+ * SOAP requests now start with a proper XML declaration.
832
+
833
+ * Added support for gzipped requests and responses (http://github.com/lucascs). While gzipped SOAP
834
+ responses are decoded automatically, you have to manually instruct Savon to gzip SOAP requests:
835
+
836
+ ``` ruby
837
+ client = Savon::Client.new "http://example.com/UserService?wsdl", :gzip => true
838
+ ```
839
+
840
+ * Fix for [issue #51](https://github.com/savonrb/savon/issues/51). Added the :soap_endpoint option to
841
+ `Savon::Client.new` which lets you specify a SOAP endpoint per client instance:
842
+
843
+ ``` ruby
844
+ client = Savon::Client.new "http://example.com/UserService?wsdl",
845
+ :soap_endpoint => "http://localhost/UserService"
846
+ ```
847
+
848
+ * Fix for [issue #50](https://github.com/savonrb/savon/issues/50). Savon still escapes special characters
849
+ in SOAP request Hash values, but you can now append an exclamation mark to Hash keys specifying that
850
+ it's value should not be escaped.
851
+
852
+ ### 0.7.6 (2010-03-21)
853
+
854
+ * Moved documentation from the Github Wiki to the actual class files and established a much nicer
855
+ documentation combining examples and implementation (using Hanna) at: http://savon.rubiii.com
856
+
857
+ * Added `Savon::Client#call` as a workaround for dispatching calls to SOAP actions named after
858
+ existing methods. Fix for [issue #48](https://github.com/savonrb/savon/issues/48).
859
+
860
+ * Add support for specifying attributes for duplicate tags (via Hash values as Arrays).
861
+ Fix for [issue #45](https://github.com/savonrb/savon/issues/45).
862
+
863
+ * Fix for [issue #41](https://github.com/savonrb/savon/issues/41).
864
+
865
+ * Fix for issues [#39](https://github.com/savonrb/savon/issues/39) and [#49](https://github.com/savonrb/savon/issues/49).
866
+ Added `Savon::SOAP#xml` which let's you specify completely custom SOAP request XML.
867
+
868
+ ### 0.7.5 (2010-02-19)
869
+
870
+ * Fix for [issue #34](https://github.com/savonrb/savon/issues/34).
871
+
872
+ * Fix for [issue #36](https://github.com/savonrb/savon/issues/36).
873
+
874
+ * Added feature requested in [issue #35](https://github.com/savonrb/savon/issues/35).
875
+
876
+ * Changed the key for specifying the order of tags from :@inorder to :order!
877
+
878
+ ### 0.7.4 (2010-02-02)
879
+
880
+ * Fix for [issue #33](https://github.com/savonrb/savon/issues/33).
881
+
882
+ ### 0.7.3 (2010-01-31)
883
+
884
+ * Added support for Geotrust-style WSDL documents (Julian Kornberger <github.corny@digineo.de>).
885
+
886
+ * Make HTTP requests include path and query only. This was breaking requests via proxy as scheme and host
887
+ were repeated (Adrian Mugnolo <adrian@mugnolo.com>)
888
+
889
+ * Avoid warning on 1.8.7 and 1.9.1 (Adrian Mugnolo <adrian@mugnolo.com>).
890
+
891
+ * Fix for [issue #29](https://github.com/savonrb/savon/issues/29).
892
+ Default to UTC to xs:dateTime value for WSSE authentication.
893
+
894
+ * Fix for [issue #28](https://github.com/savonrb/savon/issues/28).
895
+
896
+ * Fix for [issue #27](https://github.com/savonrb/savon/issues/27). The Content-Type now defaults to UTF-8.
897
+
898
+ * Modification to allow assignment of an Array with an input name and an optional Hash of values to soap.input.
899
+ Patches [issue #30](https://github.com/savonrb/savon/issues/30) (stanleydrew <andrewmbenton@gmail.com>).
900
+
901
+ * Fix for [issue #25](https://github.com/savonrb/savon/issues/25).
902
+
903
+ ### 0.7.2 (2010-01-17)
904
+
905
+ * Exposed the `Net::HTTP` response (added by Kevin Ingolfsland). Use the `http` accessor (`response.http`)
906
+ on your `Savon::Response` to access the `Net::HTTP` response object.
907
+
908
+ * Fix for [issue #21](https://github.com/savonrb/savon/issues/21).
909
+
910
+ * Fix for [issue #22](https://github.com/savonrb/savon/issues/22).
911
+
912
+ * Fix for [issue #19](https://github.com/savonrb/savon/issues/19).
913
+
914
+ * Added support for global header and namespaces. See [issue #9](https://github.com/savonrb/savon/issues/9).
915
+
916
+ ### 0.7.1 (2010-01-10)
917
+
918
+ * The Hash of HTTP headers for SOAP calls is now public via `Savon::Request#headers`.
919
+ Patch for [issue #8](https://github.com/savonrb/savon/issues/8).
920
+
921
+ ### 0.7.0 (2010-01-09)
922
+
923
+ This version comes with several changes to the public API!
924
+ Pay attention to the following list and read the updated Wiki: http://wiki.github.com/savonrb/savon
925
+
926
+ * Changed how `Savon::WSDL` can be disabled. Instead of disabling the WSDL globally/per request via two
927
+ different methods, you now simply append an exclamation mark (!) to your SOAP call: `client.get_all_users!`
928
+ Make sure you know what you're doing because when the WSDL is disabled, Savon does not know about which
929
+ SOAP actions are valid and just dispatches everything.
930
+
931
+ * The `Net::HTTP` object used by `Savon::Request` to retrieve WSDL documents and execute SOAP calls is now public.
932
+ While this makes the library even more flexible, it also comes with two major changes:
933
+
934
+ * SSL client authentication needs to be defined directly on the `Net::HTTP` object:
935
+
936
+ ``` ruby
937
+ client.request.http.client_cert = ...
938
+ ```
939
+
940
+ I added a shortcut method for setting all options through a Hash similar to the previous implementation:
941
+
942
+ ``` ruby
943
+ client.request.http.ssl_client_auth :client_cert => ...
944
+ ```
945
+
946
+ * Open and read timeouts also need to be set on the `Net::HTTP` object:
947
+
948
+ ``` ruby
949
+ client.request.http.open_timeout = 30
950
+ client.request.http.read_timeout = 30
951
+ ```
952
+
953
+ * Please refer to the `Net::HTTP` documentation for more details:
954
+ http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html
955
+
956
+ * Thanks to JulianMorrison, Savon now supports HTTP basic authentication:
957
+
958
+ ``` ruby
959
+ client.request.http.basic_auth "username", "password"
960
+ ```
961
+
962
+ * Julian also added a way to explicitly specify the order of Hash keys and values, so you should now be able
963
+ to work with services requiring a specific order of input parameters while still using Hash input.
964
+
965
+ ``` ruby
966
+ client.find_user { |soap| soap.body = { :name => "Lucy", :id => 666, :@inorder => [:id, :name] } }
967
+ ```
968
+
969
+ * `Savon::Response#to_hash` now returns the content inside of "soap:Body" instead of trying to go one
970
+ level deeper and return it's content. The previous implementation only worked when the "soap:Body" element
971
+ contained a single child. See [issue #17](https://github.com/savonrb/savon/issues/17).
972
+
973
+ * Added `Savon::SOAP#namespace` as a shortcut for setting the "xmlns:wsdl" namespace.
974
+
975
+ ``` ruby
976
+ soap.namespace = "http://example.com"
977
+ ```
978
+
979
+ ### 0.6.8 (2010-01-01)
980
+
981
+ * Improved specifications for various kinds of WSDL documents.
982
+
983
+ * Added support for SOAP endpoints which are different than the WSDL endpoint of a service.
984
+
985
+ * Changed how SOAP actions and inputs are retrieved from the WSDL documents. This might break a few existing
986
+ implementations, but makes Savon work well with even more services. If this change breaks your implementation,
987
+ please take a look at the `action` and `input` methods of the `Savon::SOAP` object.
988
+ One specific problem I know of is working with the createsend WSDL and its namespaced actions.
989
+
990
+ To make it work, call the SOAP action without namespace and specify the input manually:
991
+
992
+ ``` ruby
993
+ client.get_api_key { |soap| soap.input = "User.GetApiKey" }
994
+ ```
995
+
996
+ ### 0.6.7 (2009-12-18)
997
+
998
+ * Implemented support for a proxy server. The proxy URI can be set through an optional Hash of options passed
999
+ to instantiating `Savon::Client` (Dave Woodward <dave@futuremint.com>)
1000
+
1001
+ * Implemented support for SSL client authentication. Settings can be set through an optional Hash of arguments
1002
+ passed to instantiating `Savon::Client` (colonhyphenp)
1003
+
1004
+ * Patch for [issue #10](https://github.com/savonrb/savon/issues/10).
1005
+
1006
+ ### 0.6.6 (2009-12-14)
1007
+
1008
+ * Default to use the name of the SOAP action (the method called in a client) in lowerCamelCase for SOAP action
1009
+ and input when Savon::WSDL is disabled. You still need to specify soap.action and maybe soap.input in case
1010
+ your SOAP actions are named any different.
1011
+
1012
+ ### 0.6.5 (2009-12-13)
1013
+
1014
+ * Added an `open_timeout` method to `Savon::Request`.
1015
+
1016
+ ### 0.6.4 (2009-12-13)
1017
+
1018
+ * Refactored specs to be less unit-like.
1019
+
1020
+ * Added a getter for the `Savon::Request` to `Savon::Client` and a `read_timeout` setter for HTTP requests.
1021
+
1022
+ * `wsdl.soap_actions` now returns an Array of SOAP actions. For the previous "mapping" please use `wsdl.operations`.
1023
+
1024
+ * Replaced WSDL document with stream parsing.
1025
+
1026
+ ```
1027
+ Benchmarks (1000 SOAP calls):
1028
+
1029
+ user system total real
1030
+ 0.6.4 72.180000 8.280000 80.460000 (750.799011)
1031
+ 0.6.3 192.900000 19.630000 212.530000 (914.031865)
1032
+ ```
1033
+
1034
+ ### 0.6.3 (2009-12-11)
1035
+
1036
+ * Removing 2 ruby deprecation warnings for parenthesized arguments. (Dave Woodward <dave@futuremint.com>)
1037
+
1038
+ * Added global and per request options for disabling `Savon::WSDL`.
1039
+
1040
+ ```
1041
+ Benchmarks (1000 SOAP calls):
1042
+
1043
+ user system total real
1044
+ WSDL 192.900000 19.630000 212.530000 (914.031865)
1045
+ disabled WSDL 5.680000 1.340000 7.020000 (298.265318)
1046
+ ```
1047
+
1048
+ * Improved XPath expressions for parsing the WSDL document.
1049
+
1050
+ ```
1051
+ Benchmarks (1000 SOAP calls):
1052
+
1053
+ user system total real
1054
+ 0.6.3 192.900000 19.630000 212.530000 (914.031865)
1055
+ 0.6.2 574.720000 78.380000 653.100000 (1387.778539)
1056
+ ```
1057
+
1058
+ ### 0.6.2 (2009-12-06)
1059
+
1060
+ * Added support for changing the name of the SOAP input node.
1061
+
1062
+ * Added a CHANGELOG.
1063
+
1064
+ ### 0.6.1 (2009-12-06)
1065
+
1066
+ * Fixed a problem with WSSE credentials, where every request contained a WSSE authentication header.
1067
+
1068
+ ### 0.6.0 (2009-12-06)
1069
+
1070
+ * `method_missing` now yields the SOAP and WSSE objects to a given block.
1071
+
1072
+ * The response_process (which previously was a block passed to method_missing) was replaced by `Savon::Response`.
1073
+
1074
+ * Improved SOAP action handling (another problem that came up with issue #1).
1075
+
1076
+ ### 0.5.3 (2009-11-30)
1077
+
1078
+ * Patch for [issue #2](https://github.com/savonrb/savon/issues/2).
1079
+
1080
+ ### 0.5.2 (2009-11-30)
1081
+
1082
+ * Patch for [issue #1](https://github.com/savonrb/savon/issues/1).
1083
+
1084
+ ### 0.5.1 (2009-11-29)
1085
+
1086
+ * Optimized default response process.
1087
+
1088
+ * Added WSSE settings via defaults.
1089
+
1090
+ * Added SOAP fault and HTTP error handling.
1091
+
1092
+ * Improved documentation
1093
+
1094
+ * Added specs
1095
+
1096
+ ### 0.5.0 (2009-11-29)
1097
+
1098
+ * Complete rewrite and public release.