Package org.apache.cxf.service

Examples of org.apache.cxf.service.ServiceBuilder


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

        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


    }

    @Test
    public void testGetJaxwsBuilder() {
        factory.setServiceClass(Stock.class);
        ServiceBuilder builder = factory.newBuilder();
        assertNotNull(builder);
        assertTrue(builder instanceof JaxwsServiceBuilder);
    }
View Full Code Here

    }

    @Test
    public void testGetSimpleBuilder() {
        factory.setServiceClass(Hello.class);
        ServiceBuilder builder = factory.newBuilder();
        assertNotNull(builder);
        assertTrue(builder instanceof SimpleServiceBuilder);
    }
View Full Code Here

            String newCp = (String)context.get(ToolConstants.CFG_CLASSPATH);
            System.setProperty(JAVA_CLASS_PATH, newCp + File.pathSeparator + oldClassPath);
            LOG.log(Level.FINE, "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

            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

                + File.pathSeparator + oldClassPath;
            System.setProperty(JAVA_CLASS_PATH, newCp);
            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);

        generators.add(getWSDLGenerator(wsdlFile));
View Full Code Here

        ServiceBuilderFactory builderFactory = ServiceBuilderFactory.getInstance();
        builderFactory.setServiceClass(getServiceClass());
        // 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

    public ServiceBuilder newBuilder() {
        return newBuilder(getStyle());
    }

    public ServiceBuilder newBuilder(FrontendFactory.Style s) {
        ServiceBuilder builder = null;
        try {
            String clzName = getBuilderClassName(s);
            builder = (ServiceBuilder) Class.forName(clzName).newInstance();
        } catch (Exception e) {
            throw new ToolException("Can not find or initialize the ServiceBuilder for style: " + s
                                    + " Reason: \n" + e.getMessage(),
                                    e);
        }
        builder.setServiceClass(serviceClass);
        return builder;
    }
View Full Code Here

                + File.pathSeparator + oldClassPath;
            System.setProperty(JAVA_CLASS_PATH, newCp);
            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);

        generators.add(getWSDLGenerator(wsdlFile));
View Full Code Here

        ServiceBuilderFactory builderFactory = ServiceBuilderFactory.getInstance();
        builderFactory.setServiceClass(getServiceClass());
        // 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

Related Classes of org.apache.cxf.service.ServiceBuilder

Copyright © 2018 www.massapicom. 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.