-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
translate the operation name to find the namespace
translate the operation name to whatever the global :convert_request_keys_to option was set to before trying to resolve the namespaces for a qualified message. fixes #342.
- Loading branch information
Showing
3 changed files
with
45 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
require "spec_helper" | ||
|
||
describe "RATP example" do | ||
|
||
it "retrieves information about a specific station" do | ||
client = Savon.client do | ||
# The WSDL document provided by the service. | ||
wsdl "http://www.ratp.fr/wsiv/services/Wsiv?wsdl" | ||
|
||
# Lower timeouts so these specs don't take forever when the service is not available. | ||
open_timeout 10 | ||
read_timeout 10 | ||
|
||
# Disable logging for cleaner spec output. | ||
log false | ||
end | ||
|
||
response = client.call(:get_stations) do | ||
# For the corrent values to pass for :from_unit and :to_unit, I searched the WSDL for | ||
# the "FromUnit" type which is a "TemperatureUnit" enumeration that looks like this: | ||
# | ||
# <s:simpleType name="TemperatureUnit"> | ||
# <s:restriction base="s:string"> | ||
# <s:enumeration value="degreeCelsius"/> | ||
# <s:enumeration value="degreeFahrenheit"/> | ||
# <s:enumeration value="degreeRankine"/> | ||
# <s:enumeration value="degreeReaumur"/> | ||
# <s:enumeration value="kelvin"/> | ||
# </s:restriction> | ||
# </s:simpleType> | ||
# | ||
# Support for XS schema types needs to be improved. | ||
message(:station => { :id => 1975 }, :limit => 1) | ||
end | ||
|
||
station_name = response.body[:get_stations_response][:return][:stations][:name] | ||
expect(station_name).to eq("Cite") | ||
end | ||
|
||
end |