Search in sources :

Example 81 with JaxWsServerFactoryBean

use of org.apache.cxf.jaxws.JaxWsServerFactoryBean in project cxf by apache.

the class OperationNSTest method setUp.

@Before
public void setUp() throws Exception {
    super.setUp();
    JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
    sf.setServiceClass(NotificationLogImpl.class);
    sf.setAddress("local://NotificationLogImpl");
    sf.getServiceFactory().setDataBinding(new AegisDatabinding());
    sf.create();
}
Also used : AegisDatabinding(org.apache.cxf.aegis.databinding.AegisDatabinding) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean) Before(org.junit.Before)

Example 82 with JaxWsServerFactoryBean

use of org.apache.cxf.jaxws.JaxWsServerFactoryBean in project cxf by apache.

the class StudentTest method testWSDL.

@Test
public void testWSDL() throws Exception {
    JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
    sf.setServiceClass(StudentService.class);
    sf.setServiceBean(new StudentServiceImpl());
    sf.setAddress("local://StudentService");
    setupAegis(sf);
    Server server = sf.create();
    Document wsdl = getWSDLDocument(server);
    assertValid("//*[@name='string2stringMap']", wsdl);
}
Also used : Server(org.apache.cxf.endpoint.Server) Document(org.w3c.dom.Document) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean) Test(org.junit.Test) AbstractAegisTest(org.apache.cxf.aegis.AbstractAegisTest)

Example 83 with JaxWsServerFactoryBean

use of org.apache.cxf.jaxws.JaxWsServerFactoryBean in project cxf by apache.

the class StaxRoundTripTest method createService.

private Service createService() {
    // Create the Service
    JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
    factory.setServiceBean(new EchoImpl());
    factory.setAddress("local://Echo");
    factory.setTransportId(LocalTransportFactory.TRANSPORT_ID);
    Server server = factory.create();
    Service service = server.getEndpoint().getService();
    service.getInInterceptors().add(new LoggingInInterceptor());
    service.getOutInterceptors().add(new LoggingOutInterceptor());
    return service;
}
Also used : Server(org.apache.cxf.endpoint.Server) LoggingOutInterceptor(org.apache.cxf.ext.logging.LoggingOutInterceptor) Service(org.apache.cxf.service.Service) LoggingInInterceptor(org.apache.cxf.ext.logging.LoggingInInterceptor) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Example 84 with JaxWsServerFactoryBean

use of org.apache.cxf.jaxws.JaxWsServerFactoryBean in project cxf by apache.

the class UDPTransportTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
    factory.setAddress("udp://:" + PORT);
    factory.setServiceClass(Greeter.class);
    factory.setServiceBean(new GreeterImpl());
    // factory.setFeatures(Collections.singletonList(new LoggingFeature()));
    server = factory.create();
}
Also used : JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean) BeforeClass(org.junit.BeforeClass)

Example 85 with JaxWsServerFactoryBean

use of org.apache.cxf.jaxws.JaxWsServerFactoryBean in project cxf by apache.

the class StaxToDOMEncryptionIdentifierTest method createService.

private Service createService() {
    // Create the Service
    JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
    factory.setServiceBean(new EchoImpl());
    factory.setAddress("local://Echo");
    factory.setTransportId(LocalTransportFactory.TRANSPORT_ID);
    Server server = factory.create();
    Service service = server.getEndpoint().getService();
    service.getInInterceptors().add(new LoggingInInterceptor());
    service.getOutInterceptors().add(new LoggingOutInterceptor());
    return service;
}
Also used : Server(org.apache.cxf.endpoint.Server) LoggingOutInterceptor(org.apache.cxf.ext.logging.LoggingOutInterceptor) Service(org.apache.cxf.service.Service) LoggingInInterceptor(org.apache.cxf.ext.logging.LoggingInInterceptor) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Aggregations

JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)106 Server (org.apache.cxf.endpoint.Server)32 Test (org.junit.Test)29 Service (org.apache.cxf.service.Service)21 Bus (org.apache.cxf.Bus)15 HashMap (java.util.HashMap)13 LoggingInInterceptor (org.apache.cxf.ext.logging.LoggingInInterceptor)13 LoggingOutInterceptor (org.apache.cxf.ext.logging.LoggingOutInterceptor)13 JaxWsProxyFactoryBean (org.apache.cxf.jaxws.JaxWsProxyFactoryBean)9 AbstractAegisTest (org.apache.cxf.aegis.AbstractAegisTest)8 QName (javax.xml.namespace.QName)7 AbstractJaxWsTest (org.apache.cxf.jaxws.AbstractJaxWsTest)7 BeforeClass (org.junit.BeforeClass)7 Endpoint (org.apache.cxf.endpoint.Endpoint)6 ServerFactoryBean (org.apache.cxf.frontend.ServerFactoryBean)6 JAXWSMethodInvoker (org.apache.cxf.jaxws.JAXWSMethodInvoker)6 JaxWsServiceFactoryBean (org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean)6 AegisDatabinding (org.apache.cxf.aegis.databinding.AegisDatabinding)5 URL (java.net.URL)4 Definition (javax.wsdl.Definition)4