troelskn-handsoap 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +2 -2
- data/lib/handsoap/parser.rb +0 -1
- data/lib/handsoap/service.rb +11 -3
- data/lib/handsoap/xml_query_front.rb +7 -3
- metadata +5 -6
data/VERSION.yml
CHANGED
data/lib/handsoap/parser.rb
CHANGED
data/lib/handsoap/service.rb
CHANGED
@@ -24,7 +24,7 @@ module Handsoap
|
|
24
24
|
@xml_query_driver = Handsoap::XmlQueryFront.load_driver!(driver)
|
25
25
|
end
|
26
26
|
|
27
|
-
class Fault <
|
27
|
+
class Fault < StandardError
|
28
28
|
attr_reader :code, :reason, :details
|
29
29
|
def initialize(code, reason, details)
|
30
30
|
@code = code
|
@@ -52,6 +52,14 @@ module Handsoap
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
class HttpError < StandardError
|
56
|
+
attr_reader :response
|
57
|
+
def initialize(response)
|
58
|
+
@response = response
|
59
|
+
super()
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
55
63
|
class SoapResponse
|
56
64
|
attr_reader :document, :http_response
|
57
65
|
def initialize(document, http_response)
|
@@ -168,7 +176,7 @@ module Handsoap
|
|
168
176
|
#
|
169
177
|
# Default behaviour is to raise an error.
|
170
178
|
def on_http_error(response)
|
171
|
-
raise
|
179
|
+
raise HttpError, response
|
172
180
|
end
|
173
181
|
# Hook that is called if the dispatch returns a +Fault+.
|
174
182
|
#
|
@@ -282,7 +290,7 @@ module Handsoap
|
|
282
290
|
if /^<.*:Envelope/.match(xml_string)
|
283
291
|
begin
|
284
292
|
doc = Handsoap::XmlQueryFront.parse_string(xml_string, Handsoap.xml_query_driver)
|
285
|
-
rescue
|
293
|
+
rescue
|
286
294
|
return xml_string
|
287
295
|
end
|
288
296
|
return doc.to_xml
|
@@ -28,9 +28,13 @@ module Handsoap
|
|
28
28
|
require 'rexml/document'
|
29
29
|
elsif driver == :nokogiri
|
30
30
|
require 'nokogiri'
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
begin
|
32
|
+
gem('nokogiri') # work around bug in rubygems for Ruby 1.9
|
33
|
+
|
34
|
+
if Gem.loaded_specs['nokogiri'].version < Gem::Version.new('1.3.0')
|
35
|
+
raise "Incompatible version of Nokogiri. Please upgrade gem."
|
36
|
+
end
|
37
|
+
rescue NoMethodError
|
34
38
|
end
|
35
39
|
elsif driver == :libxml
|
36
40
|
require 'libxml'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: troelskn-handsoap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Troels Knak-Nielsen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-06 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -34,9 +34,8 @@ files:
|
|
34
34
|
- lib/handsoap/service.rb
|
35
35
|
- lib/handsoap/xml_mason.rb
|
36
36
|
- lib/handsoap/xml_query_front.rb
|
37
|
-
has_rdoc:
|
37
|
+
has_rdoc: false
|
38
38
|
homepage: http://github.com/troelskn/handsoap
|
39
|
-
licenses:
|
40
39
|
post_install_message:
|
41
40
|
rdoc_options:
|
42
41
|
- --charset=UTF-8
|
@@ -61,9 +60,9 @@ requirements:
|
|
61
60
|
gem install httpclient
|
62
61
|
- It is recommended that you install either "nokogiri" or "libxml-ruby"
|
63
62
|
rubyforge_project:
|
64
|
-
rubygems_version: 1.
|
63
|
+
rubygems_version: 1.2.0
|
65
64
|
signing_key:
|
66
|
-
specification_version:
|
65
|
+
specification_version: 3
|
67
66
|
summary: Handsoap is a library for creating SOAP clients in Ruby
|
68
67
|
test_files: []
|
69
68
|
|