Package org.apache.cxf.service

Examples of org.apache.cxf.service.ServiceBuilder


        }

        // check for command line specification of data binding.
      

        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);
        builderFactory.setDatabindingName(getDataBindingName());
        // The service class determines the frontend, so no need to pass it in twice.
        ServiceBuilder builder = builderFactory.newBuilder(applicationContext);

        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

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

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

        try {
            builder = (ServiceBuilder) 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(applicationContext);
        assertNotNull(builder);
        assertTrue(builder instanceof JaxwsServiceBuilder);
    }
View Full Code Here

    }

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

            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

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

        builder.validate();

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

        return builder;
    }
View Full Code Here

    ServiceBuilderFactory factory = ServiceBuilderFactory.getInstance(new ArrayList<String>());

    @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

                                                                      "jaxb");

    @Test
    public void testGetJaxwsBuilder() {
        factory.setServiceClass(Stock.class);
        ServiceBuilder builder = factory.newBuilder();
        assertNotNull(builder);
        assertTrue(builder instanceof JaxwsServiceBuilder);
    }
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.