savon 2.12.0 → 2.12.1
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.
- checksums.yaml +5 -5
- data/.travis.yml +17 -9
- data/CHANGELOG.md +7 -3
- data/lib/savon/qualified_message.rb +1 -1
- data/lib/savon/soap_fault.rb +1 -1
- data/lib/savon/version.rb +1 -1
- data/spec/fixtures/response/empty_soap_fault.xml +13 -0
- data/spec/fixtures/wsdl/elements_in_types.xml +43 -0
- data/spec/savon/options_spec.rb +11 -0
- data/spec/savon/soap_fault_spec.rb +10 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: adc5b65f9ac22024b164dae28b0198a4269b97ab14afac694b946e7cef896d7e
|
4
|
+
data.tar.gz: 13138a12de62757d551a9114b2741501accbbad169a2a00a9dee7f439ad48a78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11e3b779fc0376993c46d6ab595e96896a5b0a7ea6f478d3ce93918ebfbd93ff14c4c5ac44c0080ce527c4e30e8615d559b373900acf35b96d2d67b1661b0f28
|
7
|
+
data.tar.gz: 0a8b5bcacf019b33eaafee305aee4f33c1733c26455d446738c28ad14567d69288c0f1cc0226f2e9c5304687a5b49a7011397465c16350b03b31370626014292
|
data/.travis.yml
CHANGED
@@ -1,18 +1,26 @@
|
|
1
1
|
# https://github.com/travis-ci/travis-ci/wiki/.travis.yml-options
|
2
2
|
language: "ruby"
|
3
|
-
|
4
|
-
before_install:
|
5
|
-
- gem install bundler
|
3
|
+
|
6
4
|
script: "bundle exec rake --trace"
|
5
|
+
|
7
6
|
rvm:
|
8
|
-
- 2.
|
9
|
-
- 2.
|
10
|
-
- 2.
|
11
|
-
|
12
|
-
- rbx-2
|
7
|
+
- "2.5"
|
8
|
+
- "2.6"
|
9
|
+
- "2.7"
|
10
|
+
|
13
11
|
matrix:
|
12
|
+
include:
|
13
|
+
- name: "JRuby 9.2"
|
14
|
+
rvm: jruby-9.2.12.0
|
15
|
+
jdk: openjdk11
|
16
|
+
env: JAVA_OPTS="--add-opens java.base/java.security.cert=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED"
|
17
|
+
- name: Rubinius
|
18
|
+
rvm: rbx-4
|
19
|
+
dist: trusty
|
14
20
|
allow_failures:
|
15
|
-
-
|
21
|
+
- name: Rubinius
|
22
|
+
- name: "JRuby 9.2"
|
16
23
|
fast_finish: true
|
24
|
+
|
17
25
|
notifications:
|
18
26
|
irc: "irc.freenode.org#savon"
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
|
2
|
+
## 2.12.1 (2020-07-05)
|
3
|
+
|
4
|
+
* Fix: [#917](https://github.com/savonrb/savon/pull/917) elementFormDefault="qualified" regression
|
5
|
+
* Fix: [#875](https://github.com/savonrb/savon/pull/875) Fix detecting Soap 1.1 Fault when faultcode and faultstring are empty
|
6
|
+
|
1
7
|
# 2.12.0 (2018-01-16)
|
2
8
|
|
3
9
|
* Drop support for ruby 2.1 and below.
|
@@ -7,8 +13,6 @@
|
|
7
13
|
* Feature: [#753](https://github.com/savonrb/savon/pull/753) Add headers configuration to WSDLRequest#build
|
8
14
|
* Feature: [#812](https://github.com/savonrb/savon/pull/812) Allow `proxy` option to be `nil`.
|
9
15
|
* Feature: [#838](https://github.com/savonrb/savon/pull/838) Added ssl_ca_path and ssl_cert_store to globals
|
10
|
-
* Feature: [#794](https://github.com/savonrb/savon/pull/794) Add global option ssl_ciphers
|
11
|
-
|
12
16
|
|
13
17
|
# 2.11.2 (2017-08-03)
|
14
18
|
* Fix: [#676](https://github.com/savonrb/savon/pull/676) Fixes handling of `content!` and `attributes!`
|
@@ -25,7 +29,7 @@
|
|
25
29
|
|
26
30
|
# 2.11.0 (2015-03-31)
|
27
31
|
|
28
|
-
* Formally drop support for 1.8.7.
|
32
|
+
* Formally drop support for 1.8.7.
|
29
33
|
|
30
34
|
# 2.10.1 (2015-03-15)
|
31
35
|
|
@@ -26,7 +26,7 @@ module Savon
|
|
26
26
|
translated_key = translate_tag(key)
|
27
27
|
newkey = add_namespaces_to_values(key, path).first
|
28
28
|
newpath = path + [translated_key]
|
29
|
-
newhash[newkey] = to_hash(value, newpath)
|
29
|
+
newhash[newkey] = to_hash(value, @types[newpath] ? [@types[newpath]] : newpath)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
newhash
|
data/lib/savon/soap_fault.rb
CHANGED
@@ -4,7 +4,7 @@ module Savon
|
|
4
4
|
def self.present?(http, xml = nil)
|
5
5
|
xml ||= http.body
|
6
6
|
fault_node = xml.include?("Fault>")
|
7
|
-
soap1_fault = xml.
|
7
|
+
soap1_fault = xml.match(/faultcode\/?\>/) && xml.match(/faultstring\/?\>/)
|
8
8
|
soap2_fault = xml.include?("Code>") && xml.include?("Reason>")
|
9
9
|
|
10
10
|
fault_node && (soap1_fault || soap2_fault)
|
data/lib/savon/version.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
2
|
+
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
3
|
+
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
|
4
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
5
|
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
6
|
+
<SOAP-ENV:Body>
|
7
|
+
<SOAP-ENV:Fault>
|
8
|
+
<faultcode/>
|
9
|
+
<faultstring/>
|
10
|
+
<detail><soapVal><ERRNO xsi:type="xsd:string">80:1289245853:55</ERRNO></soapVal></detail>
|
11
|
+
</SOAP-ENV:Fault>
|
12
|
+
</SOAP-ENV:Body>
|
13
|
+
</SOAP-ENV:Envelope>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="www.example.com/XML" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="www.example.com/XML" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
3
|
+
<wsdl:types>
|
4
|
+
<s:schema elementFormDefault="qualified" targetNamespace="www.example.com/XML">
|
5
|
+
<s:complexType name="Transaction" abstract="true">
|
6
|
+
<s:sequence>
|
7
|
+
<s:element minOccurs="0" maxOccurs="1" name="Qualified" type="s:string" />
|
8
|
+
</s:sequence>
|
9
|
+
</s:complexType>
|
10
|
+
<s:complexType name="TopLevelTransaction">
|
11
|
+
<s:complexContent mixed="false">
|
12
|
+
<s:extension base="tns:Transaction">
|
13
|
+
</s:extension>
|
14
|
+
</s:complexContent>
|
15
|
+
</s:complexType>
|
16
|
+
<s:element name="TopLevelTransaction">
|
17
|
+
<s:complexType>
|
18
|
+
<s:sequence>
|
19
|
+
<s:element minOccurs="0" maxOccurs="1" name="TopLevelTransaction" type="tns:TopLevelTransaction" />
|
20
|
+
</s:sequence>
|
21
|
+
</s:complexType>
|
22
|
+
</s:element>
|
23
|
+
</s:schema>
|
24
|
+
</wsdl:types>
|
25
|
+
<wsdl:message name="TopLevelTransactionSoapIn">
|
26
|
+
<wsdl:part name="parameters" element="tns:TopLevelTransaction" />
|
27
|
+
</wsdl:message>
|
28
|
+
<wsdl:portType name="XMLTESoap">
|
29
|
+
<wsdl:operation name="TopLevelTransaction">
|
30
|
+
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">TopLevelTransaction.</wsdl:documentation>
|
31
|
+
<wsdl:input message="tns:TopLevelTransactionSoapIn" />
|
32
|
+
</wsdl:operation>
|
33
|
+
</wsdl:portType>
|
34
|
+
<wsdl:binding name="XMLTESoap12" type="tns:XMLTESoap">
|
35
|
+
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
36
|
+
<wsdl:operation name="TopLevelTransaction">
|
37
|
+
<soap12:operation soapAction="www.example.com/XML/TopLevelTransaction" style="document" />
|
38
|
+
<wsdl:input>
|
39
|
+
<soap12:body use="literal" />
|
40
|
+
</wsdl:input>
|
41
|
+
</wsdl:operation>
|
42
|
+
</wsdl:binding>
|
43
|
+
</wsdl:definitions>
|
data/spec/savon/options_spec.rb
CHANGED
@@ -219,6 +219,17 @@ describe "Options" do
|
|
219
219
|
expect(response.http.body).to include("<user>lea</user>")
|
220
220
|
expect(response.http.body).to include("<password>top-secret</password>")
|
221
221
|
end
|
222
|
+
|
223
|
+
it "qualifies elements embedded in complex types" do
|
224
|
+
client = new_client(:endpoint => @server.url(:repeat),
|
225
|
+
:wsdl => Fixture.wsdl(:elements_in_types))
|
226
|
+
msg = {":TopLevelTransaction"=>{":Qualified"=>"A Value"}}
|
227
|
+
|
228
|
+
response = client.call(:top_level_transaction, :message => msg)
|
229
|
+
|
230
|
+
expect(response.http.body.scan(/<tns:Qualified>/).count).to eq(1)
|
231
|
+
end
|
232
|
+
|
222
233
|
end
|
223
234
|
|
224
235
|
context "global :env_namespace" do
|
@@ -2,6 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe Savon::SOAPFault do
|
4
4
|
let(:soap_fault) { Savon::SOAPFault.new new_response(:body => Fixture.response(:soap_fault)), nori }
|
5
|
+
let(:empty_soap_fault) { Savon::SOAPFault.new new_response(:body => Fixture.response(:empty_soap_fault)), nori }
|
5
6
|
let(:soap_fault2) { Savon::SOAPFault.new new_response(:body => Fixture.response(:soap_fault12)), nori }
|
6
7
|
let(:soap_fault_funky) { Savon::SOAPFault.new new_response(:body => Fixture.response(:soap_fault_funky)), nori }
|
7
8
|
let(:soap_fault_nc) { Savon::SOAPFault.new new_response(:body => Fixture.response(:soap_fault)), nori_no_convert }
|
@@ -29,6 +30,11 @@ describe Savon::SOAPFault do
|
|
29
30
|
expect(Savon::SOAPFault.present? http).to be_truthy
|
30
31
|
end
|
31
32
|
|
33
|
+
it "returns true if the HTTP response contains a SOAP 1.1 fault with empty fault tags" do
|
34
|
+
http = new_response(:body => Fixture.response(:empty_soap_fault))
|
35
|
+
expect(Savon::SOAPFault.present? http).to be_truthy
|
36
|
+
end
|
37
|
+
|
32
38
|
it "returns true if the HTTP response contains a SOAP 1.2 fault" do
|
33
39
|
http = new_response(:body => Fixture.response(:soap_fault12))
|
34
40
|
expect(Savon::SOAPFault.present? http).to be_truthy
|
@@ -50,6 +56,10 @@ describe Savon::SOAPFault do
|
|
50
56
|
expect(soap_fault.send method).to eq("(soap:Server) Fault occurred while processing.")
|
51
57
|
end
|
52
58
|
|
59
|
+
it "returns an empty fault message" do
|
60
|
+
expect(empty_soap_fault.send method).to eq(nil)
|
61
|
+
end
|
62
|
+
|
53
63
|
it "returns a SOAP 1.2 fault message" do
|
54
64
|
expect(soap_fault2.send method).to eq("(soap:Sender) Sender Timeout")
|
55
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: savon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.12.
|
4
|
+
version: 2.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Harrington
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nori
|
@@ -233,6 +233,7 @@ files:
|
|
233
233
|
- spec/fixtures/gzip/message.gz
|
234
234
|
- spec/fixtures/response/another_soap_fault.xml
|
235
235
|
- spec/fixtures/response/authentication.xml
|
236
|
+
- spec/fixtures/response/empty_soap_fault.xml
|
236
237
|
- spec/fixtures/response/f5.xml
|
237
238
|
- spec/fixtures/response/header.xml
|
238
239
|
- spec/fixtures/response/list.xml
|
@@ -250,6 +251,7 @@ files:
|
|
250
251
|
- spec/fixtures/wsdl/betfair.xml
|
251
252
|
- spec/fixtures/wsdl/brand.xml
|
252
253
|
- spec/fixtures/wsdl/edialog.xml
|
254
|
+
- spec/fixtures/wsdl/elements_in_types.xml
|
253
255
|
- spec/fixtures/wsdl/interhome.xml
|
254
256
|
- spec/fixtures/wsdl/lower_camel.xml
|
255
257
|
- spec/fixtures/wsdl/multiple_namespaces.xml
|
@@ -311,8 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
313
|
- !ruby/object:Gem::Version
|
312
314
|
version: '0'
|
313
315
|
requirements: []
|
314
|
-
|
315
|
-
rubygems_version: 2.6.13
|
316
|
+
rubygems_version: 3.0.1
|
316
317
|
signing_key:
|
317
318
|
specification_version: 4
|
318
319
|
summary: Heavy metal SOAP client
|