Class: Savon::WSDL

Inherits:
Object show all
Defined in:
lib/savon/wsdl.rb

Overview

Savon::WSDL

Represents a WSDL document.

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ WSDL

Expects a Savon::Request object.



9
10
11
# File 'lib/savon/wsdl.rb', line 9

def initialize(request)
  @request = request
end

Instance Method Details

#namespace_uriObject

Returns the namespace URI from the WSDL.



14
15
16
# File 'lib/savon/wsdl.rb', line 14

def namespace_uri
  @namespace_uri ||= parse_namespace_uri
end

#respond_to?(method) ⇒ Boolean

Returns true for available methods and SOAP actions.

Returns:

  • (Boolean)


27
28
29
30
# File 'lib/savon/wsdl.rb', line 27

def respond_to?(method)
  return true if soap_actions.keys.include? method
  super
end

#soap_actionsObject

Returns a Hash of available SOAP actions mapped to snake_case (keys) and their original names and inputs in another Hash (values).



20
21
22
23
24
# File 'lib/savon/wsdl.rb', line 20

def soap_actions
  @soap_actions ||= parse_soap_operations.inject({}) do |hash, (input, action)|
    hash.merge input.snakecase.to_sym => { :name => action, :input => input }
  end
end

#to_sObject

Returns the WSDL document.



33
34
35
# File 'lib/savon/wsdl.rb', line 33

def to_s
  wsdl_response.body
end