Examples of AxisServiceGroup


Examples of org.apache.axis2.description.AxisServiceGroup

                    deploymentFileData.getAbsolutePath(), configCtx, isDirectory);
            deploymentFileData.setServiceMetaData(serviceMetaData);
            Map<String, AxisService> serviceMap = executeServiceBuilderExtensions(
                  deploymentFileData, configCtx);       
           
            AxisServiceGroup serviceGroup = new AxisServiceGroup(axisConfig);
            serviceGroup.setServiceGroupClassLoader(deploymentFileData.getClassLoader());
            ArrayList<AxisService> serviceList = archiveReader.processServiceGroup(
                    serviceMetaData, deploymentFileData,
                    serviceGroup, isDirectory, serviceMap,
                    configCtx);
            URL location = deploymentFileData.getFile().toURI().toURL();

            // Add the hierarchical path to the service group
            if (location != null) {
                String serviceHierarchy = Utils.getServiceHierarchy(location.getPath(),
                        this.directory);
                if (serviceHierarchy != null && !"".equals(serviceHierarchy)) {
                    serviceGroup.setServiceGroupName(serviceHierarchy
                            + serviceGroup.getServiceGroupName());
                    for (AxisService axisService : serviceList) {
                        axisService.setName(serviceHierarchy + axisService.getName());
                    }
                }
            }
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

    public void deployFromUrl(DeploymentFileData deploymentFileData) throws DeploymentException {
        URL servicesURL = deploymentFileData.getUrl();
        if (servicesURL == null) {
            return;
        }
        AxisServiceGroup serviceGroup = new AxisServiceGroup();
        StringWriter errorWriter = new StringWriter();
        int index = servicesURL.getPath().lastIndexOf(File.separator);
         String serviceFile;
         if(index > 0){
             serviceFile = servicesURL.getPath().substring(index);
         } else {
             serviceFile = servicesURL.getPath();
         }
         ArrayList<AxisService> servicelist =
         populateService(serviceGroup,
         servicesURL,
         serviceFile.substring(0, serviceFile.indexOf(".aar")));
         try {
            DeploymentEngine.addServiceGroup(serviceGroup, servicelist, servicesURL, null,
             axisConfig);
            // let the system have hidden services
            if (!JavaUtils.isTrueExplicitly(serviceGroup.getParameterValue(
                    Constants.HIDDEN_SERVICE_PARAM_NAME))) {
                    log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_WS,
                    serviceGroup.getServiceGroupName(),
                    servicesURL.toString()));
            }
        } catch (AxisFault axisFault) {
            log.error(
                    Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE,
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

            //attach the hierarchical part if it is not null
            if (serviceHierarchy != null) {
                fileName = serviceHierarchy + fileName;
            }
            AxisServiceGroup serviceGroup = axisConfig.removeServiceGroup(fileName);
            //Fixed - https://issues.apache.org/jira/browse/AXIS2-4610
            if (serviceGroup != null) {
                for (Iterator<AxisService> services = serviceGroup.getServices(); services.hasNext();) {
                AxisService axisService = (AxisService) services.next();
                ServiceLifeCycle serviceLifeCycle = axisService.getServiceLifeCycle();
                if (serviceLifeCycle != null) {
                    serviceLifeCycle.shutDown(configCtx, axisService);
                }
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

        } else {
            axisService.setClientSide(true);
            removeAxisService = false;
            this.axisService = axisConfig.getService(axisService.getName());
        }
        AxisServiceGroup axisServiceGroup = this.axisService.getAxisServiceGroup();
        ServiceGroupContext sgc = configContext.createServiceGroupContext(axisServiceGroup);
        serviceContext = sgc.getServiceContext(this.axisService);
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

        // if a configuration context was created for this client there'll also
        //  be a service group, so discard that
        if (!createConfigCtx) {
            String serviceGroupName = axisService.getAxisServiceGroup().getServiceGroupName();
            AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
            AxisServiceGroup asg = axisConfiguration.getServiceGroup(serviceGroupName);
            if ((asg != null) && removeAxisService) {
                axisConfiguration.removeServiceGroup(serviceGroupName);
            }
        } else {
            configContext.terminate();
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

            this.axisService = axisService;

            axisService.setClientSide(true);
            axisConfig.addService(axisService);
        }
        AxisServiceGroup axisServiceGroup = axisService.getAxisServiceGroup();
        ServiceGroupContext serviceGroupContext =
                configContext.createServiceGroupContext(axisServiceGroup);
        this.serviceContext = serviceGroupContext.getServiceContext(axisService);
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

     * @param service an AxisService to deploy.
     * @throws AxisFault if something goes wrong (invalid service, service is
     *                   already deployed, etc...)
     */
    public synchronized void addService(AxisService service) throws AxisFault {
        AxisServiceGroup axisServiceGroup = new AxisServiceGroup();
        axisServiceGroup.setServiceGroupName(service.getName());
        axisServiceGroup.setParent(this);
        axisServiceGroup.addService(service);
        addServiceGroup(axisServiceGroup);
//        processEndpoints(service, service.getAxisConfiguration());
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

     * @throws AxisFault in case of an error in adding the service to the group specified or if the group is not existing
     */
    public void addServiceToExistingServiceGroup(AxisService axisService,
                                                 String serviceGroupName) throws AxisFault {

        AxisServiceGroup serviceGroup = getServiceGroup(serviceGroupName);
        if (serviceGroup == null) {
            String message = "A ServiceGroup with the provided name "
                    + serviceGroupName + " is not existing";
            log.error(message);
            throw new AxisFault(message);
        }

        if (axisService.getSchemaTargetNamespace() == null) {
            axisService.setSchemaTargetNamespace(Java2WSDLConstants.AXIS2_XSD);
        }

        if (axisService.isUseDefaultChains()) {
            Iterator<AxisOperation> operations = axisService.getOperations();
            while (operations.hasNext()) {
                AxisOperation operation = operations.next();
                phasesinfo.setOperationPhases(operation);
            }
        }

        Map<String, AxisEndpoint> endpoints = axisService.getEndpoints();
        if (endpoints == null || endpoints.size() == 0) {
      org.apache.axis2.deployment.util.Utils.addEndpointsToService(
          axisService, axisService.getAxisConfiguration());
            endpoints = axisService.getEndpoints();
    }

        String serviceName = axisService.getName();
        addToAllServicesMap(axisService);

        if (endpoints != null) {
            Iterator<String> endpointNameIter = endpoints.keySet().iterator();
            while (endpointNameIter.hasNext()) {
                String endpointName = endpointNameIter.next();
                if (log.isDebugEnabled()) {
                    log.debug("Adding service to allEndpoints map: ("
                            + serviceName + "," + endpointName + ") ");
                }

                allEndpoints.put(serviceName + "." + endpointName, axisService);
            }
            if (log.isDebugEnabled()) {
                log.debug("After adding to allEndpoints map, size is "
                        + allEndpoints.size());
            }
        }
       
        serviceGroup.addService(axisService);

        if (!axisService.isClientSide()) {
            notifyObservers(new AxisEvent(AxisEvent.SERVICE_DEPLOY, axisService), axisService);
        }
    }
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

            }
        }
    }

    public AxisServiceGroup removeServiceGroup(String serviceGroupName) throws AxisFault {
        AxisServiceGroup axisServiceGroup = (AxisServiceGroup) getChild(serviceGroupName);
        if (axisServiceGroup == null) {
            throw new AxisFault(Messages.getMessage("invalidservicegroupname",
                                                    serviceGroupName));
        }

        Iterator<AxisService> services = axisServiceGroup.getServices();
        boolean isClientSide = false;
        while (services.hasNext()) {
            AxisService axisService = services.next();          
            isClientSide = axisService.isClientSide()? true : false;
View Full Code Here

Examples of org.apache.axis2.description.AxisServiceGroup

    }

    public void onEngage(AxisModule module, AxisDescription engager) throws AxisFault {
        Iterator<AxisServiceGroup> servicegroups = getServiceGroups();
        while (servicegroups.hasNext()) {
            AxisServiceGroup serviceGroup = servicegroups.next();
            serviceGroup.engageModule(module, engager);
        }
    }
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.