Search in sources :

Example 1 with JaxwsServiceBuilder

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);
}
Also used : JaxwsServiceBuilder(org.apache.cxf.jaxws.JaxwsServiceBuilder) 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 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"));
}
Also used : Bus(org.apache.cxf.Bus) ToolContext(org.apache.cxf.tools.common.ToolContext) JaxwsServiceBuilder(org.apache.cxf.jaxws.JaxwsServiceBuilder) Before(org.junit.Before)

Example 3 with JaxwsServiceBuilder

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;
}
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)3 SimpleServiceBuilder (org.apache.cxf.simple.SimpleServiceBuilder)2 Bus (org.apache.cxf.Bus)1 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 ToolContext (org.apache.cxf.tools.common.ToolContext)1 ToolException (org.apache.cxf.tools.common.ToolException)1 Before (org.junit.Before)1 Test (org.junit.Test)1