troelskn-handsoap 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/handsoap/service.rb +21 -21
  3. metadata +3 -3
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 4
3
- :patch: 0
3
+ :patch: 1
4
4
  :major: 0
@@ -57,30 +57,30 @@ module Handsoap
57
57
  def self.logger=(io)
58
58
  @@logger = io
59
59
  end
60
- # Sets the endpoint for the service.
61
- # Arguments:
62
- # :uri => endpoint uri of the service. Required.
63
- # :version => 1 | 2
64
- # :envelope_namespace => Namespace of SOAP-envelope
65
- # :request_content_type => Content-Type of HTTP request.
66
- # You must supply either :version or both :envelope_namspace and :request_content_type.
67
- # :version is simply a shortcut for default values.
60
+ # Sets the endpoint for the service.
61
+ # Arguments:
62
+ # :uri => endpoint uri of the service. Required.
63
+ # :version => 1 | 2
64
+ # :envelope_namespace => Namespace of SOAP-envelope
65
+ # :request_content_type => Content-Type of HTTP request.
66
+ # You must supply either :version or both :envelope_namspace and :request_content_type.
67
+ # :version is simply a shortcut for default values.
68
68
  def self.endpoint(args = {})
69
69
  @uri = args[:uri] || raise("Missing option :uri")
70
- if args[:version]
70
+ if args[:version]
71
71
  soap_namespace = { 1 => 'http://schemas.xmlsoap.org/soap/envelope/', 2 => 'http://www.w3.org/2003/05/soap-envelope' }
72
- raise("Unknown protocol version '#{@protocol_version.inspect}'") if soap_namespace[args[:version]].nil?
73
- @envelope_namespace = soap_namespace[args[:version]]
74
- @request_content_type = args[:version] == 1 ? "text/xml" : "application/soap+xml"
75
- end
76
- @envelope_namespace = args[:envelope_namespace] unless args[:envelope_namespace].nil?
77
- @request_content_type = args[:request_content_type] unless args[:request_content_type].nil?
78
- if @envelope_namespace.nil? || @request_content_type.nil?
79
- raise("Missing option :envelope_namespace, :request_content_type or :version")
80
- end
72
+ raise("Unknown protocol version '#{@protocol_version.inspect}'") if soap_namespace[args[:version]].nil?
73
+ @envelope_namespace = soap_namespace[args[:version]]
74
+ @request_content_type = args[:version] == 1 ? "text/xml" : "application/soap+xml"
75
+ end
76
+ @envelope_namespace = args[:envelope_namespace] unless args[:envelope_namespace].nil?
77
+ @request_content_type = args[:request_content_type] unless args[:request_content_type].nil?
78
+ if @envelope_namespace.nil? || @request_content_type.nil?
79
+ raise("Missing option :envelope_namespace, :request_content_type or :version")
80
+ end
81
81
  end
82
82
  def self.envelope_namespace
83
- @envelope_namespace
83
+ @envelope_namespace
84
84
  end
85
85
  def self.request_content_type
86
86
  @request_content_type
@@ -285,7 +285,7 @@ module Handsoap
285
285
  begin
286
286
  doc = Handsoap::XmlQueryFront.parse_string(xml_string, Handsoap.xml_query_driver)
287
287
  rescue Exception => ex
288
- return "Formatting failed: " + ex.to_s
288
+ return xml_string
289
289
  end
290
290
  return doc.to_xml
291
291
  # return "\n\e[1;33m" + doc.to_s + "\e[0m"
@@ -295,7 +295,7 @@ module Handsoap
295
295
 
296
296
  end
297
297
 
298
- # Legacy/CS code here. This shouldn't be used in new applications.
298
+ # Legacy/BC code here. This shouldn't be used in new applications.
299
299
  module Handsoap
300
300
  class Service
301
301
  # Registers a simple method mapping without any arguments and no parsing of response.
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Troels Knak-Nielsen
@@ -33,7 +33,7 @@ files:
33
33
  - lib/handsoap/service.rb
34
34
  - lib/handsoap/xml_mason.rb
35
35
  - lib/handsoap/xml_query_front.rb
36
- has_rdoc: true
36
+ has_rdoc: false
37
37
  homepage: http://github.com/troelskn/handsoap
38
38
  licenses:
39
39
  post_install_message:
@@ -62,7 +62,7 @@ requirements:
62
62
  rubyforge_project:
63
63
  rubygems_version: 1.3.5
64
64
  signing_key:
65
- specification_version: 2
65
+ specification_version: 3
66
66
  summary: Handsoap is a library for creating SOAP clients in Ruby
67
67
  test_files: []
68
68