Sha256: fa7fb8261ddef8ed768bb9129ed0165300578ee9198f7cee2bfa5dda36d9ecad
Contents?: true
Size: 1.65 KB
Versions: 37
Compression:
Stored size: 1.65 KB
Contents
require 'jsender' require 'soap4juddi' module SoarSr class ServiceDefinitions < SoarSr::Handler include Jsender def register_service_definition(service, definition)_{ service = standardize(service) authorize provided?(service, 'service') and registered?(service, 'services') and provided?(definition, 'service definition') and wadl?(definition) result = @uddi.get_service(service) service = result['data'] service['definition'] = definition result = @uddi.save_service(service['name'], service['description'], service['definition']) authorized?(result) and identifier?(result, 'service') success('service definition registered') }end def service_definition_for_service(service)_{ service = standardize(service) # byebug provided?(service, 'service') and registered?(service, 'services') result = @uddi.get_service(service)['data'] identifier?(result, 'service') return fail('service has no definition') if (result['definition'].nil?) or (result['definition'] == "") success_data({'definition' => result['definition']}) }end def deregister_service_definition(service)_{ service = standardize(service) authorize provided?(service, 'service') and registered?(service, 'services') result = @uddi.get_service(service) service = result['data'] service['definition'] = "" result = @uddi.save_service(service['name'], service['description'], service['definition']) authorized?(result) and identifier?(result, 'service') success('service definition deregistered') }end end end
Version data entries
37 entries across 37 versions & 1 rubygems