use of org.apache.cxf.jaxws.JaxwsServiceBuilder in project cxf by apache.
the class ServiceBuilderFactoryTest method testGetJaxwsBuilder.
@Test
public void testGetJaxwsBuilder() {
factory.setServiceClass(Stock.class);
ServiceBuilder builder = factory.newBuilder();
assertNotNull(builder);
assertTrue(builder instanceof JaxwsServiceBuilder);
}
use of org.apache.cxf.jaxws.JaxwsServiceBuilder in project cxf by apache.
the class JaxwsServiceBuilderTest method setUp.
@Before
public void setUp() throws Exception {
JAXBContextCache.clearCaches();
builder = new JaxwsServiceBuilder();
builder.setBus(BusFactory.getDefaultBus());
generator.setBus(builder.getBus());
generator.setToolContext(new ToolContext());
Bus b = builder.getBus();
assertNotNull(b.getExtension(DestinationFactoryManager.class).getDestinationFactory("http://schemas.xmlsoap.org/soap/http"));
}
use of org.apache.cxf.jaxws.JaxwsServiceBuilder 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