Examples of ServiceBuilder


Examples of org.apache.axis2.deployment.ServiceBuilder

            try {
                InputStream ais = axis2config.toURL().openStream();
                if (ais != null) {
                    LOG.debug("Configuring service using: "+axis2config.toURL());
                    ConfigurationContext configCtx = new ConfigurationContext(axisConfig);
                    ServiceBuilder builder = new ServiceBuilder(is, configCtx, axisService);
                    builder.populateService(builder.buildOM());
                }
            } catch (FileNotFoundException except) {
                LOG.debug("Axis2 service configuration not found: " + axis2config);
            } catch (IOException except) {
                LOG.warn("Exception while configuring service: " + axis2config, except);
View Full Code Here

Examples of org.apache.axis2.deployment.ServiceBuilder

            init(); // create a new ServiceClient instance
            try {
                InputStream ais = file.toURI().toURL().openStream();
                if (ais != null) {
                    if (__log.isDebugEnabled()) __log.debug("Configuring service " + _serviceName + " using: " + file);
                    ServiceBuilder builder = new ServiceBuilder(ais, new ConfigurationContext(client.getAxisConfiguration()), client.getAxisService());
                    builder.populateService(builder.buildOM());
                }
            } catch (Exception e) {
                if (__log.isWarnEnabled()) __log.warn("Exception while configuring service: " + _serviceName, e);
            }
        }
View Full Code Here

Examples of org.apache.axis2.deployment.ServiceBuilder

            try {
                InputStream ais = axis2config.toURL().openStream();
                if (ais != null) {
                    LOG.debug("Configuring service using: "+axis2config.toURL());
                    ConfigurationContext configCtx = new ConfigurationContext(axisConfig);
                    ServiceBuilder builder = new ServiceBuilder(ais, configCtx, axisService);
                    builder.populateService(builder.buildOM());
                }
            } catch (FileNotFoundException except) {
                LOG.debug("Axis2 service configuration not found: " + axis2config);
            } catch (IOException except) {
                LOG.warn("Exception while configuring service: " + axis2config, except);
View Full Code Here

Examples of org.apache.axis2.deployment.ServiceBuilder

                log.debug("Configuring service " + axisService.getName() + " using: " + service_file);
            }
            try {
                if (configCtx == null)
                    configCtx = new ConfigurationContext(axisService.getAxisConfiguration());
                ServiceBuilder builder = new ServiceBuilder(configCtx, axisService);
                StAXOMBuilder omBuilder = new StAXOMBuilder(serviceDescIs);
                OMElement documentEle = omBuilder.getDocumentElement();
                Iterator itr = documentEle.getChildElements();

                while (itr.hasNext()) {
                    OMElement serviceEle = (OMElement) itr.next();
                    if (serviceEle.getLocalName().toLowerCase().equals("service")) {
                        if (serviceEle.getAttribute(new QName("name")) != null &&
                                serviceEle.getAttribute(new QName("name")).getAttributeValue().equals(axisService.getName())) {

                            builder.populateService(serviceEle);
                            // This is a hack to avoid security configurations get persisted when we configure using
                            // services.xml file or policy.xml file BPEL package. But this should be fix at the
                            // Carbon Persistence manager.
                            Parameter param = new Parameter(CONFIGURED_USING_BPEL_PKG_CONFIG_FILES, "true");
                            axisService.addParameter(param);

                        } else if (serviceEle.getAttribute(new QName("name")) != null && // Starts with check is used to handle anonymous services generated for external service.
                                axisService.getName().startsWith("axis_service_for_" + serviceEle.getAttributeValue(new QName("name")))) {
                            String svcName = axisService.getName();
                            AxisService axisSvc = builder.populateService(serviceEle);
                            axisSvc.setName(svcName);

                        }
                    }
                }
View Full Code Here

Examples of org.apache.axis2.deployment.ServiceBuilder

        if (ais != null) {
            log.debug("Configuring service " + axisService.getName() + " using: " + service_file);
            try {
                if (configCtx == null)
                    configCtx = new ConfigurationContext(axisService.getAxisConfiguration());
                ServiceBuilder builder = new ServiceBuilder(ais, configCtx, axisService);
                builder.populateService(builder.buildOM());
            } finally {
                ais.close();
            }
            // the service builder only updates the module list but do not engage them
            // modules have to be engaged manually,
View Full Code Here

Examples of org.apache.cxf.service.ServiceBuilder

            throw new ToolException("Cannot get databinding bean " + databindingBeanName
                                    + " for databinding " + databindingName);
        }

        String beanName = getBuilderBeanName(s);
        ServiceBuilder builder = null;

        try {
            builder = applicationContext.getBean(beanName, ServiceBuilder.class);
            AbstractServiceFactory serviceFactory = (AbstractServiceFactory)builder;
            serviceFactory.setDataBinding(dataBinding);
        } catch (RuntimeException e) {
            throw new ToolException("Can not get ServiceBuilder bean " + beanName
                                    + "to initialize the ServiceBuilder for style: " + s + " Reason: \n"
                                    + e.getMessage(), e);
        }
        builder.setServiceClass(serviceClass);
        return builder;
    }
View Full Code Here

Examples of org.apache.cxf.service.ServiceBuilder

            LOG.log(Level.INFO, "NEW_CP", newCp);
        }

        // check for command line specification of data binding.

        ServiceBuilder builder = getServiceBuilder();
        ServiceInfo serviceInfo = builder.createService();

        File jsFile = getOutputFile(builder.getOutputFile(), serviceInfo.getName().getLocalPart() + ".js");

        BasicNameManager nameManager = BasicNameManager.newNameManager(serviceInfo, null);
        NamespacePrefixAccumulator prefixManager = new NamespacePrefixAccumulator(serviceInfo
            .getXmlSchemaCollection());
        Collection<SchemaInfo> schemata = serviceInfo.getSchemas();
View Full Code Here

Examples of org.apache.cxf.service.ServiceBuilder

        }
        builderFactory.setServiceClass(clz);
        builderFactory.setDatabindingName(getDataBindingName());
        // The service class determines the frontend, so no need to pass it in
        // twice.
        ServiceBuilder builder = builderFactory.newBuilder();

        builder.validate();

        builder.setTransportId(getTransportId());
        builder.setBus(getBus());
        builder.setBindingId(getBindingId());

        return builder;
    }
View Full Code Here

Examples of org.apache.cxf.service.ServiceBuilder

            String newCp = (String)context.get(ToolConstants.CFG_CLASSPATH);
            System.setProperty(JAVA_CLASS_PATH, newCp + File.pathSeparator + oldClassPath);
            LOG.log(Level.INFO, "NEW_CP", newCp);
        }

        ServiceBuilder builder = getServiceBuilder();
        ServiceInfo service = builder.createService();

        customize(service);

        File wsdlFile = getOutputFile(builder.getOutputFile(),
                                      service.getName().getLocalPart() + ".wsdl");

        File outputDir = getOutputDir(wsdlFile);
        if (context.containsKey(ToolConstants.CFG_WSDL)) {
            generators.add(getWSDLGenerator(wsdlFile));
View Full Code Here

Examples of org.apache.cxf.service.ServiceBuilder

            context.put(ToolConstants.GEN_FROM_SEI, Boolean.FALSE);
        }
        builderFactory.setServiceClass(clz);
        // TODO check if user specify the style from cli arguments
        //      builderFactory.setStyle(style/from/command/line);
        ServiceBuilder builder = builderFactory.newBuilder();

        builder.validate();

        if (context.get(ToolConstants.CFG_ADDRESS) != null) {
            String address = (String)context.get(ToolConstants.CFG_ADDRESS);
            builder.setAddress(address);
        } else {
            builder.setAddress(DEFAULT_ADDRESS);
        }
        builder.setTransportId(getTransportId());
        builder.setBus(getBus());
        builder.setBindingId(getBindingId());

        return builder;
    }
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.