Class: RetrieveServiceContent

Inherits:
Invocable show all
Defined in:
lib/lookup_service_helper.rb

Overview

Encapsulates the RetrieveServiceContent operation of the lookup service.

Instance Attribute Summary

Attributes inherited from Invocable

#client, #operation, #response

Instance Method Summary collapse

Methods inherited from Invocable

#invoke, #request_xml, #response_hash, #response_xml

Constructor Details

#initialize(client) ⇒ RetrieveServiceContent

Constructs a new instance.



402
403
404
# File 'lib/lookup_service_helper.rb', line 402

def initialize(client)
    super(:retrieve_service_content, client)
end

Instance Method Details

#body_xml(body) ⇒ Object

<S:Envelope xmlns:S=“schemas.xmlsoap.org/soap/envelope/”>

    <S:Body>
        <RetrieveServiceContent xmlns="urn:lookup">
            <_this type="LookupServiceInstance">ServiceInstance</_this>
        </RetrieveServiceContent>
    </S:Body>
</S:Envelope>


415
416
417
418
419
420
421
# File 'lib/lookup_service_helper.rb', line 415

def body_xml(body)
    body.tag!("RetrieveServiceContent", "xmlns" => "urn:lookup") do |rsc|
        rsc.tag!("_this", "type" => "LookupServiceInstance") do |this|
            this << "ServiceInstance"
        end
    end
end

#get_service_registrationObject

    <RetrieveServiceContentResponse xmlns="urn:lookup">
        <returnval>
            <lookupService type="LookupLookupService">lookupService</lookupService>
            <serviceRegistration type="LookupServiceRegistration">ServiceRegistration</serviceRegistration>
            <deploymentInformationService type="LookupDeploymentInformationService">deploymentInformationService</deploymentInformationService>
            <l10n type="LookupL10n">l10n</l10n>
        </returnval>
    </RetrieveServiceContentResponse>
...


435
436
437
438
439
440
441
# File 'lib/lookup_service_helper.rb', line 435

def get_service_registration
    Base.log.debug "RetrieveServiceContent: response_hash = #{response_hash}"
    return_val = response_hash[:retrieve_service_content_response][:returnval]
    result = return_val[:service_registration]
    Base.log.debug "RetrieveServiceContent: result = #{result}"
    result
end