forked from savonrb/savon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for namespaced entries in SOAP response XML. closes savonrb#87.
- Loading branch information
Showing
6 changed files
with
79 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
class ResponseFixture | ||
class << self | ||
|
||
def self.authentication(value = nil) | ||
case value | ||
when :to_hash | ||
{ :success => true, | ||
:authentication_value => { | ||
:token => "a68d1d6379b62ff339a0e0c69ed4d9cf", | ||
:token_hash => "AAAJxA;cIedoT;mY10ExZwG6JuKgp2OYKxow==", | ||
:client => "radclient" | ||
} | ||
} | ||
else | ||
@@authentication ||= load_fixture :authentication | ||
def authentication(value = nil) | ||
@authentication ||= load_fixture :authentication | ||
|
||
case value | ||
when :to_hash then Savon::SOAP::XML.to_hash(@authentication)[:authenticate_response][:return] | ||
else @authentication | ||
end | ||
end | ||
end | ||
|
||
def self.soap_fault | ||
@@soap_fault ||= load_fixture :soap_fault | ||
end | ||
def soap_fault | ||
@soap_fault ||= load_fixture :soap_fault | ||
end | ||
|
||
def self.soap_fault12 | ||
@@soap_fault12 ||= load_fixture :soap_fault12 | ||
end | ||
def soap_fault12 | ||
@soap_fault12 ||= load_fixture :soap_fault12 | ||
end | ||
|
||
def self.multi_ref | ||
@@multi_ref ||= load_fixture :multi_ref | ||
end | ||
def multi_ref | ||
@multi_ref ||= load_fixture :multi_ref | ||
end | ||
|
||
private | ||
def list | ||
@list ||= load_fixture :list | ||
end | ||
|
||
def self.load_fixture(fixture) | ||
File.read File.dirname(__FILE__) + "/xml/#{fixture}.xml" | ||
end | ||
private | ||
|
||
def load_fixture(fixture) | ||
File.read File.dirname(__FILE__) + "/xml/#{fixture}.xml" | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<soapenv:Body> | ||
<MultiNamespacedEntryResponse xmlns="http://www.example.com/BusinessRulesEngine/xsd"> | ||
<history> | ||
<ns10:case xmlns:ns10="http://www.example.com/Common/xsd"> | ||
<ns10:logTime>2010-09-21T18:22:01.558+10:00</ns10:logTime> | ||
<ns10:logType>Notes Log</ns10:logType> | ||
<ns10:logText>test</ns10:logText> | ||
</ns10:case> | ||
<ns11:case xmlns:ns11="http://www.example.com/Common/xsd"> | ||
<ns11:logTime>2010-09-21T18:22:07.038+10:00</ns11:logTime> | ||
<ns11:logType>Notes Log</ns11:logType> | ||
<ns11:logText>another test</ns11:logText> | ||
</ns11:case> | ||
</history> | ||
</MultiNamespacedEntryResponse> | ||
</soapenv:Body> | ||
</soapenv:Envelope> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters