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.
-
#operation_from(soap_action) ⇒ Object
Returns a SOAP operation Hash containing the SOAP action and input for a given
soap_call
. -
#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, @enabled = request, true 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 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 |
#operation_from(soap_action) ⇒ Object
Returns a SOAP operation Hash containing the SOAP action and input for a given soap_call
.
50 51 52 53 |
# File 'lib/savon/wsdl.rb', line 50 def operation_from(soap_action) return operations[soap_action] if enabled? { :action => soap_action.to_soap_key, :input => soap_action.to_soap_key } 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 !enabled? || 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.
56 57 58 |
# File 'lib/savon/wsdl.rb', line 56 def to_s @document ||= @request.wsdl.body end |