Module: Rubydora::Soap

Defined in:
lib/rubydora/soap.rb

Overview

Fedora SOAP API extension

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(repository) ⇒ Object

Parameters:



5
6
7
# File 'lib/rubydora/soap.rb', line 5

def self.extended repository
  require 'savon'
end

Instance Method Details

#soapSOAP::RPC::Driver

SOAP API endpoint

Returns:

  • (SOAP::RPC::Driver)


11
12
13
14
15
16
17
18
# File 'lib/rubydora/soap.rb', line 11

def soap
 @soap ||= begin
             client = Savon::Client.new do |wsdl, http|
               wsdl.document = "#{ config[:url] }/wsdl?api=API-M"
               http.auth.basic config[:user], config[:password]
             end
           end
end