Package org.wso2.carbon.governance.api.services

Examples of org.wso2.carbon.governance.api.services.ServiceManager.addService()


    public void testServiceRename() throws Exception {
        ServiceManager serviceManager = new ServiceManager(registry);

        Service service = serviceManager.newService(new QName("http://banga.queek.queek/blaa", "sfosf"));
        serviceManager.addService(service);

        service.setQName(new QName("http://doc.x.ge/yong", "almdo"));
        serviceManager.updateService(service);

        Service exactServiceCopy = serviceManager.getService(service.getId());
View Full Code Here


        fileInputStream.read(fileContents);

        OMElement contentElement = GovernanceUtils.buildOMElement(fileContents);

        service = serviceManager.newService(contentElement);
        serviceManager.addService(service);

        service.setQName(new QName("http://doc.x.ge/yong", "almdo"));
        serviceManager.updateService(service);

        exactServiceCopy = serviceManager.getService(service.getId());
View Full Code Here

    public void testServiceDelete() throws Exception {
        ServiceManager serviceManager = new ServiceManager(registry);

        Service service = serviceManager.newService(new QName("http://banga.doom.queek/blaa", "lmnop"));
        serviceManager.addService(service);

        Service newService = serviceManager.getService(service.getId());
        assertNotNull(newService);

        serviceManager.removeService(newService.getId());
View Full Code Here

        newService = serviceManager.getService(service.getId());
        assertNull(newService);


        service = serviceManager.newService(new QName("http://banga.bang.queek/blaa", "basss"));
        serviceManager.addService(service);

        newService = serviceManager.getService(service.getId());
        assertNotNull(newService);

        registry.delete(newService.getPath());
View Full Code Here

                        }
                    }
                    return true;
                }
            }
            serviceManager.addService(service);
            if (lifeCycleName != null) {
                registry.associateAspect(service.getPath(), lifeCycleName);
            }
            /*if (!"".equals(finalPath)) {
                if(service.getPath().startsWith(RegistryConstants.PATH_SEPARATOR+ TRUNK)){
View Full Code Here

        Service service = serviceManager.newService(new QName("http://wso2.com/test/xxx", "myService"));

        service.addAttribute("endpoints_entry", ":http://endpoint1");
        service.addAttribute("endpoints_entry", "QA:http://endpoint2");

        serviceManager.addService(service);

        Endpoint[] endpoints = service.getAttachedEndpoints();
        assertEquals(2, endpoints.length);

        assertEquals("http://endpoint1", endpoints[0].getUrl());
View Full Code Here

    // add endpoints as attachments
    public void testAttachEndpointsToService() throws Exception {
        ServiceManager serviceManager = new ServiceManager(registry);
        Service service = serviceManager.newService(new QName("http://wso2.com/test234/xxxxx", "myServicxcde"));
        serviceManager.addService(service);

        EndpointManager endpointManager = new EndpointManager(registry);
        Endpoint ep1 = endpointManager.newEndpoint("http://endpoint1xx");
        endpointManager.addEndpoint(ep1);
View Full Code Here

    public void testAssociatingEndpoints() throws Exception {
        ServiceManager serviceManager = new ServiceManager(registry);
        Service service = serviceManager.newService(new QName("http://done.ding/dong/doodo", "bangService343"));

        serviceManager.addService(service);

        EndpointManager endpointManager = new EndpointManager(registry);
        Endpoint endpoint = endpointManager.newEndpoint("http://dos.dis/doos/safdsf/ppeekk");
        endpointManager.addEndpoint(endpoint);
        service.attachEndpoint(endpoint);
View Full Code Here

        ServiceManager serviceManager = new ServiceManager(registry);
        Service service = serviceManager.newService(contentElement);

        service.addAttribute("custom-attribute", "custom-value");
        serviceManager.addService(service);


        // so retrieve it back
        String serviceId = service.getId();
        Service newService = serviceManager.getService(serviceId);
View Full Code Here

    // detach endpoints
    public void testDetachEndpointsToService() throws Exception {
        ServiceManager serviceManager = new ServiceManager(registry);
        Service service = serviceManager.newService(new QName("http://wso2.com/test234/xxxxx", "myServicxcde"));
        serviceManager.addService(service);

        EndpointManager endpointManager = new EndpointManager(registry);
        Endpoint ep1 = endpointManager.newEndpoint("http://endpoint1");
        endpointManager.addEndpoint(ep1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.