Module: Libis::Services::SoapClient
- Included in:
- CollectiveAccess::Connector, Digitool::DigitalEntityManager, Digitool::DigitoolConnector, Digitool::MetaDataManager, Rosetta::Client, Libis::Services::Sharepoint::Search
- Defined in:
- lib/libis/services/soap_client.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #configure(wsdl, options = {}) ⇒ Object
- #operations ⇒ Object
- #request(method, message = {}, call_options = {}, parse_options = {}) ⇒ Object
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
13 14 15 |
# File 'lib/libis/services/soap_client.rb', line 13 def client @client end |
Instance Method Details
#configure(wsdl, options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/libis/services/soap_client.rb', line 15 def configure(wsdl, = {}) opts = { wsdl: wsdl, raise_errors: false, soap_version: 1, filters: [:password], pretty_print_xml: true, }.merge @client = Savon.client(opts) { yield if block_given? } end |
#operations ⇒ Object
27 28 29 |
# File 'lib/libis/services/soap_client.rb', line 27 def operations @client.operations end |
#request(method, message = {}, call_options = {}, parse_options = {}) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/libis/services/soap_client.rb', line 31 def request(method, = {}, = {}, = {}) response = client.call(method, message: ) do |locals| .each do |key, value| locals.send(key, value) end end return yield(response) if block_given? parse_result(response, ) end |