savon 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/CHANGELOG +11 -0
  2. data/README.rdoc +5 -3
  3. data/Rakefile +2 -0
  4. data/lib/savon.rb +1 -0
  5. data/lib/savon/client.rb +54 -13
  6. data/lib/savon/core_ext.rb +0 -0
  7. data/lib/savon/core_ext/array.rb +20 -6
  8. data/lib/savon/core_ext/datetime.rb +0 -0
  9. data/lib/savon/core_ext/hash.rb +36 -15
  10. data/lib/savon/core_ext/net_http.rb +1 -2
  11. data/lib/savon/core_ext/object.rb +1 -3
  12. data/lib/savon/core_ext/string.rb +9 -2
  13. data/lib/savon/core_ext/symbol.rb +0 -0
  14. data/lib/savon/core_ext/uri.rb +1 -1
  15. data/lib/savon/logger.rb +56 -0
  16. data/lib/savon/request.rb +42 -50
  17. data/lib/savon/response.rb +62 -9
  18. data/lib/savon/soap.rb +157 -42
  19. data/lib/savon/wsdl.rb +71 -6
  20. data/lib/savon/wsdl_stream.rb +2 -2
  21. data/lib/savon/wsse.rb +36 -5
  22. data/spec/basic_spec_helper.rb +0 -0
  23. data/spec/endpoint_helper.rb +0 -0
  24. data/spec/fixtures/response/response_fixture.rb +0 -0
  25. data/spec/fixtures/response/xml/authentication.xml +0 -0
  26. data/spec/fixtures/response/xml/multi_ref.xml +0 -0
  27. data/spec/fixtures/response/xml/soap_fault.xml +0 -0
  28. data/spec/fixtures/response/xml/soap_fault12.xml +0 -0
  29. data/spec/fixtures/wsdl/wsdl_fixture.rb +0 -0
  30. data/spec/fixtures/wsdl/xml/authentication.xml +0 -0
  31. data/spec/fixtures/wsdl/xml/geotrust.xml +0 -0
  32. data/spec/fixtures/wsdl/xml/namespaced_actions.xml +0 -0
  33. data/spec/fixtures/wsdl/xml/no_namespace.xml +0 -0
  34. data/spec/http_stubs.rb +0 -0
  35. data/spec/integration/http_basic_auth_spec.rb +0 -0
  36. data/spec/integration/server.rb +0 -0
  37. data/spec/savon/client_spec.rb +5 -1
  38. data/spec/savon/core_ext/array_spec.rb +0 -0
  39. data/spec/savon/core_ext/datetime_spec.rb +0 -0
  40. data/spec/savon/core_ext/hash_spec.rb +10 -1
  41. data/spec/savon/core_ext/net_http_spec.rb +0 -0
  42. data/spec/savon/core_ext/object_spec.rb +0 -0
  43. data/spec/savon/core_ext/string_spec.rb +6 -2
  44. data/spec/savon/core_ext/symbol_spec.rb +0 -0
  45. data/spec/savon/core_ext/uri_spec.rb +4 -0
  46. data/spec/savon/request_spec.rb +5 -4
  47. data/spec/savon/response_spec.rb +0 -0
  48. data/spec/savon/soap_spec.rb +124 -130
  49. data/spec/savon/wsdl_spec.rb +0 -0
  50. data/spec/savon/wsse_spec.rb +0 -0
  51. data/spec/spec_helper.rb +0 -0
  52. metadata +55 -37
  53. data/readme/client.rdoc +0 -18
  54. data/readme/errors.rdoc +0 -11
  55. data/readme/logging.rdoc +0 -11
  56. data/readme/participate.rdoc +0 -21
  57. data/readme/request.rdoc +0 -37
  58. data/readme/response.rdoc +0 -46
  59. data/readme/soap.rdoc +0 -71
  60. data/readme/value_mapping.rdoc +0 -49
  61. data/readme/wsdl.rdoc +0 -39
  62. data/readme/wsse.rdoc +0 -28
@@ -1,39 +0,0 @@
1
- Savon::WSDL represents the WSDL of your service, including information like the namespace URI and available SOAP actions.
2
-
3
- == Raw WSDL document
4
-
5
- client.wsdl.to_s
6
-
7
- == Available SOAP actions
8
-
9
- client.wsdl.soap_actions
10
- => [:get_all_users, :get_user_by_id]
11
-
12
- == Namespace URI
13
-
14
- client.wsdl.namespace_uri
15
- => "http://ws.userservice.example.com"
16
-
17
- == Disable Savon::WSDL
18
-
19
- Especially with large services (i.e. Ebay), getting and parsing the WSDL document can really slow down your request. So in order to gain performance, you can disable the use of Savon::WSDL by simply appending an exclamation mark (!) to your SOAP call.
20
-
21
- client.get_all_users!
22
-
23
- Disabling Savon::WSDL comes with some disadvantages though. First of all, you need to know and specify the namespace URI of your service per request.
24
-
25
- client.get_user_by_id! do |soap|
26
- soap.namespace = "http://example.com/UserService"
27
- soap.body = { :id => 666 }
28
- end
29
-
30
- Without a WSDL, Savon also has to guess the name of the SOAP action and input. It takes the name of the method called on its client instance, converts it to lowerCamelCase and uses the result. The SOAP call above expects a SOAP action with an original name of "getUserById".
31
-
32
- If that doesn't fit the naming conventions of your service, you need to specify the names yourself. Here is an example request for a SOAP action called "GetUserById", requiring an input tag named "GetUserByIdRequest".
33
-
34
- client.get_user_by_id! do |soap|
35
- soap.action = "GetUserById"
36
- soap.input = "GetUserByIdRequest"
37
- soap.namespace = "http://example.com/UserService"
38
- soap.body = { :id => 666 }
39
- end
@@ -1,28 +0,0 @@
1
- Savon::WSSE represents WSSE authentication. Pass a block to your SOAP call and the WSSE object is passed to it as the second argument. The object allows setting the WSSE username, password and whether to use digest authentication.
2
-
3
- == Username and password
4
-
5
- By default, Savon does not use WSSE authentication. Simply specify a username and password to change this.
6
-
7
- response = client.get_all_users do |soap, wsse|
8
- wsse.username = "gorilla"
9
- wsse.password = "secret"
10
- end
11
-
12
- == Digest
13
-
14
- To use WSSE digest authentication, just use the digest method to set digest authentication to true.
15
-
16
- response = client.get_all_users do |soap, wsse|
17
- wsse.username = "gorilla"
18
- wsse.password = "secret"
19
- wsse.digest = true
20
- end
21
-
22
- == Default to WSSE
23
-
24
- In case all you're services require WSSE authentication, you can set your credentials and whether to use WSSE digest for every request:
25
-
26
- Savon::WSSE.username = "dude"
27
- Savon::WSSE.password = "secret"
28
- Savon::WSSE.digest = true