Class: CampaignMaster::SoapClient

Inherits:
Object
  • Object
show all
Defined in:
lib/campaign_master/soap_client.rb

Class Method Summary collapse

Class Method Details

.attributesObject



29
30
31
32
33
# File 'lib/campaign_master/soap_client.rb', line 29

def self.attributes
  {
    "xmlns" => "http://campaignmaster.com.au"
  }
end

.get_client(soap_header = nil) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/campaign_master/soap_client.rb', line 3

def self.get_client(soap_header = nil)
  options = {
    wsdl: CampaignMaster.wsdl,
    ssl_verify_mode: :none,
    convert_request_keys_to: :none,
    env_namespace: :S,
    namespace_identifier: nil,
    namespaces: self::namespaces,
    log_level: :warn
  }

  options = options.merge({soap_header: soap_header}) if !soap_header.nil?

  Savon.client(options)
end

.namespacesObject



19
20
21
22
23
24
25
26
27
# File 'lib/campaign_master/soap_client.rb', line 19

def self.namespaces
  {
    "xmlns:ns2"    => "http://campaignmaster.com.au",
    "xmlns:ns3"    => "http://schemas.datacontract.org/2004/07/ECM.BLL.WebServices.Client.API.DataContracts",
    "xmlns:ns4"    => "http://schemas.microsoft.com/2003/10/Serialization/",
    "xmlns:ns5"    => "http://schemas.datacontract.org/2004/07/ECM.Model",
    "xmlns:ns1381" => "http://campaignmaster.com.au"
  }
end