Class: LolSoap::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/lolsoap/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(wsdl) ⇒ Client

Returns a new instance of Client.

Parameters:

  • wsdl

    a WSDL object, or a string that will be parsed into one



11
12
13
# File 'lib/lolsoap/client.rb', line 11

def initialize(wsdl)
  @wsdl = wsdl.respond_to?(:to_str) ? WSDL.parse(wsdl.to_str) : wsdl
end

Instance Attribute Details

#wsdlObject (readonly)

Returns the value of attribute wsdl.



8
9
10
# File 'lib/lolsoap/client.rb', line 8

def wsdl
  @wsdl
end

Instance Method Details

#request(name) ⇒ LolSoap::Request

Returns A request for the API action you want to perform.

Returns:



16
17
18
# File 'lib/lolsoap/client.rb', line 16

def request(name)
  Request.new(Envelope.new(wsdl, wsdl.operation(name)))
end

#response(request, raw) ⇒ LolSoap::Response

Returns A response object for an API action that has been performed.

Returns:

  • (LolSoap::Response)

    A response object for an API action that has been performed



21
22
23
# File 'lib/lolsoap/client.rb', line 21

def response(request, raw)
  Response.parse(request, raw)
end