Class: Savon::WSDL
Overview
Savon::WSDL
Represents the WSDL document.
Instance Attribute Summary collapse
-
#enabled ⇒ Object
writeonly
Sets whether to use the WSDL.
Instance Method Summary collapse
-
#enabled? ⇒ Boolean
Returns whether to use the WSDL.
-
#initialize(request) ⇒ WSDL
constructor
Initializer, expects a Savon::Request.
-
#namespace_uri ⇒ Object
Returns the namespace URI of the WSDL.
-
#operations ⇒ Object
Returns a Hash of SOAP operations including their corresponding SOAP actions and inputs.
-
#respond_to?(method) ⇒ Boolean
Returns
true
for available methods and SOAP actions. -
#soap_actions ⇒ Object
Returns an Array of available SOAP actions.
-
#soap_endpoint ⇒ Object
Returns the SOAP endpoint.
-
#to_s ⇒ Object
Returns the raw WSDL document.
Constructor Details
#initialize(request) ⇒ WSDL
Initializer, expects a Savon::Request.
9 10 11 |
# File 'lib/savon/wsdl.rb', line 9 def initialize(request) @request = request end |
Instance Attribute Details
#enabled=(value) ⇒ Object (writeonly)
Sets whether to use the WSDL.
14 15 16 |
# File 'lib/savon/wsdl.rb', line 14 def enabled=(value) @enabled = value end |
Instance Method Details
#enabled? ⇒ Boolean
Returns whether to use the WSDL. Defaults to true
.
17 18 19 |
# File 'lib/savon/wsdl.rb', line 17 def enabled? @enabled.nil? ? true : @enabled end |
#namespace_uri ⇒ Object
Returns the namespace URI of the WSDL.
22 23 24 |
# File 'lib/savon/wsdl.rb', line 22 def namespace_uri @namespace_uri ||= stream.namespace_uri end |
#operations ⇒ Object
Returns a Hash of SOAP operations including their corresponding SOAP actions and inputs.
33 34 35 |
# File 'lib/savon/wsdl.rb', line 33 def operations @operations ||= stream.operations end |
#respond_to?(method) ⇒ Boolean
Returns true
for available methods and SOAP actions.
43 44 45 46 |
# File 'lib/savon/wsdl.rb', line 43 def respond_to?(method) return true if soap_actions.include? method super end |
#soap_actions ⇒ Object
Returns an Array of available SOAP actions.
27 28 29 |
# File 'lib/savon/wsdl.rb', line 27 def soap_actions @soap_actions ||= stream.operations.keys end |
#soap_endpoint ⇒ Object
Returns the SOAP endpoint.
38 39 40 |
# File 'lib/savon/wsdl.rb', line 38 def soap_endpoint @soap_endpoint ||= stream.soap_endpoint end |
#to_s ⇒ Object
Returns the raw WSDL document.
49 50 51 52 |
# File 'lib/savon/wsdl.rb', line 49 def to_s # TODO: this class fails completely when the URL for the WSDL redirects @document ||= @request.wsdl.body end |