Sha256: 30fc42621e591fa6e015db888c9237724a0fbb5578deb39da6d09a32b3dd9237
Contents?: true
Size: 1.51 KB
Versions: 4
Compression:
Stored size: 1.51 KB
Contents
require 'jsender' require 'soap4juddi' module SoarSr class ServiceDefinitions < SoarSr::Handler include Jsender def register_service_definition(service, definition)_{ 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)_{ # 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)_{ 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
4 entries across 4 versions & 1 rubygems