soap-object 0.3 → 0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== Version 0.4 / 2013-3-18
|
2
|
+
* Enhancements
|
3
|
+
* Added body accessor to SoapObject to return raw body
|
4
|
+
* Added body_xml method to SoapObject to return Nokogiri::XML::Document containing body
|
5
|
+
|
1
6
|
=== Version 0.3 / 2013-3-17
|
2
7
|
* Enhancements
|
3
8
|
* Added SoapObject::Factory to assist in creating new service objects
|
@@ -21,3 +21,14 @@ Feature: This describes the core functionality of the SoapObject object
|
|
21
21
|
When I create an instance of the SoapObject class
|
22
22
|
Then I should be able to make a call and receive the correct results
|
23
23
|
|
24
|
+
Scenario: Getting the body from a response
|
25
|
+
Given I have the url for a remote wsdl
|
26
|
+
When I create an instance of the SoapObject class
|
27
|
+
Then I should be able to make a call and receive the correct results
|
28
|
+
And the results body should contain "<NewDataSet><Table>"
|
29
|
+
|
30
|
+
Scenario: Getting the body from a response
|
31
|
+
Given I have the url for a remote wsdl
|
32
|
+
When I create an instance of the SoapObject class
|
33
|
+
Then I should be able to make a call and receive the correct results
|
34
|
+
And the results body xml should be a Nokogiri XML object
|
@@ -42,3 +42,11 @@ end
|
|
42
42
|
Then /^I should be able to make a call and receive the correct results$/ do
|
43
43
|
@so.get_airport_name_for('SFO').should == 'SAN FRANCISCO INTL'
|
44
44
|
end
|
45
|
+
|
46
|
+
Then /^the results body should contain "(.*?)"$/ do |body|
|
47
|
+
@so.body.should include body
|
48
|
+
end
|
49
|
+
|
50
|
+
Then /^the results body xml should be a Nokogiri XML object$/ do
|
51
|
+
@so.body_xml.should be_instance_of Nokogiri::XML::Document
|
52
|
+
end
|
data/lib/soap-object/version.rb
CHANGED
data/lib/soap-object.rb
CHANGED
@@ -26,7 +26,7 @@ require 'soap-object/factory'
|
|
26
26
|
# view all of the options.
|
27
27
|
#
|
28
28
|
module SoapObject
|
29
|
-
attr_reader :wsdl, :response
|
29
|
+
attr_reader :wsdl, :response, :body
|
30
30
|
|
31
31
|
def initialize
|
32
32
|
@client = Savon.client(client_properties)
|
@@ -52,12 +52,20 @@ module SoapObject
|
|
52
52
|
@client.operations
|
53
53
|
end
|
54
54
|
|
55
|
+
#
|
56
|
+
# Return a Nokogiri::XML::Document containing the raw body.
|
57
|
+
#
|
58
|
+
def body_xml
|
59
|
+
Nokogiri::XML(body)
|
60
|
+
end
|
61
|
+
|
55
62
|
private
|
56
63
|
|
57
64
|
def method_missing(*args)
|
58
65
|
method = args.shift
|
59
66
|
@response = @client.call(method, {message: args.shift})
|
60
|
-
body_for(method)
|
67
|
+
@body = body_for(method)
|
68
|
+
@body
|
61
69
|
end
|
62
70
|
|
63
71
|
def client_properties
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soap-object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.4'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|
@@ -101,7 +101,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
segments:
|
103
103
|
- 0
|
104
|
-
hash:
|
104
|
+
hash: 1660955488053861236
|
105
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
segments:
|
112
112
|
- 0
|
113
|
-
hash:
|
113
|
+
hash: 1660955488053861236
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
116
|
rubygems_version: 1.8.25
|