Search in sources :

Example 1 with SimpleServiceBuilder

use of org.apache.cxf.simple.SimpleServiceBuilder in project cxf by apache.

the class ServiceBuilderFactoryTest method testGetSimpleBuilder.

@Test
public void testGetSimpleBuilder() {
    factory.setServiceClass(Hello.class);
    ServiceBuilder builder = factory.newBuilder();
    assertNotNull(builder);
    assertTrue(builder instanceof SimpleServiceBuilder);
}
Also used : SimpleServiceBuilder(org.apache.cxf.simple.SimpleServiceBuilder) ServiceBuilder(org.apache.cxf.service.ServiceBuilder) JaxwsServiceBuilder(org.apache.cxf.jaxws.JaxwsServiceBuilder) SimpleServiceBuilder(org.apache.cxf.simple.SimpleServiceBuilder) Test(org.junit.Test)

Example 2 with SimpleServiceBuilder

use of org.apache.cxf.simple.SimpleServiceBuilder in project cxf by apache.

the class DefaultServiceBuilderFactory method newBuilder.

@Override
public ServiceBuilder newBuilder(FrontendFactory.Style s) {
    DataBinding dataBinding;
    final String dbn = getDatabindingName();
    if (ToolConstants.JAXB_DATABINDING.equals(dbn)) {
        dataBinding = new JAXBDataBinding();
    } else if (ToolConstants.AEGIS_DATABINDING.equals(dbn)) {
        dataBinding = new AegisDatabinding();
    } else {
        throw new ToolException("Unsupported databinding: " + dbn);
    }
    AbstractServiceFactory builder = null;
    if (Style.Jaxws.equals(s)) {
        builder = new JaxwsServiceBuilder();
    } else if (Style.Simple.equals(s)) {
        builder = new SimpleServiceBuilder();
    } else {
        throw new ToolException("Unsupported frontend style: " + s);
    }
    builder.setDataBinding(dataBinding);
    builder.setServiceClass(serviceClass);
    return builder;
}
Also used : AbstractServiceFactory(org.apache.cxf.frontend.AbstractServiceFactory) SimpleServiceBuilder(org.apache.cxf.simple.SimpleServiceBuilder) DataBinding(org.apache.cxf.databinding.DataBinding) JAXBDataBinding(org.apache.cxf.jaxb.JAXBDataBinding) JAXBDataBinding(org.apache.cxf.jaxb.JAXBDataBinding) AegisDatabinding(org.apache.cxf.aegis.databinding.AegisDatabinding) ToolException(org.apache.cxf.tools.common.ToolException) JaxwsServiceBuilder(org.apache.cxf.jaxws.JaxwsServiceBuilder)

Aggregations

JaxwsServiceBuilder (org.apache.cxf.jaxws.JaxwsServiceBuilder)2 SimpleServiceBuilder (org.apache.cxf.simple.SimpleServiceBuilder)2 AegisDatabinding (org.apache.cxf.aegis.databinding.AegisDatabinding)1 DataBinding (org.apache.cxf.databinding.DataBinding)1 AbstractServiceFactory (org.apache.cxf.frontend.AbstractServiceFactory)1 JAXBDataBinding (org.apache.cxf.jaxb.JAXBDataBinding)1 ServiceBuilder (org.apache.cxf.service.ServiceBuilder)1 ToolException (org.apache.cxf.tools.common.ToolException)1 Test (org.junit.Test)1