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);
}
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;
}
Aggregations