Class: Savon::WSDL

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

Overview

Savon::WSDL

Savon::WSDL represents a WSDL document. A WSDL document serves as a more or less qualitative API documentation.

Instance Method Summary collapse

Methods included from Validation

#validate!

Constructor Details

#initialize(request) ⇒ WSDL

Expects a Savon::Request object.



11
12
13
# File 'lib/savon/wsdl.rb', line 11

def initialize(request)
  @request = request
end

Instance Method Details

#mapped_soap_actionsObject

Returns a Hash of available SOAP actions and their original names.



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

def mapped_soap_actions
  @mapped_soap_actions ||= parse_soap_actions.inject Hash.new do |hash, soap_action|
    hash.merge soap_action.snakecase.to_sym => soap_action
  end
end

#namespace_uriObject

Returns the namespace URI from the WSDL.



16
17
18
# File 'lib/savon/wsdl.rb', line 16

def namespace_uri
  @namespace_uri ||= parse_namespace_uri
end

#soap_actionsObject

Returns an Array of available SOAP actions from the WSDL.



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

def soap_actions
  mapped_soap_actions.keys
end

#to_sObject

Returns the WSDL or nil in case the WSDL could not be retrieved.



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

def to_s
  wsdl_response ? wsdl_response.body : nil
end