Search in sources :

Example 6 with Server

use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.

the class CXFEndpointProviderTest method addServerWithJAXRSBindingGiven.

@Test
public void addServerWithJAXRSBindingGiven() throws Exception {
    Server server = createServerStub(SERVICE_QNAME_2, ENDPOINT_1, JAXRS_BINDING_ID, SOAP_HTTP_TRANSPORT_ID);
    CXFEndpointProvider epp = new CXFEndpointProvider(server, ENDPOINT_1, PROPERTIES);
    assertEquals(JAXRS, epp.getBinding());
}
Also used : Server(org.apache.cxf.endpoint.Server) Test(org.junit.Test)

Example 7 with Server

use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.

the class CXFEndpointProviderTest method addServerWithSOAP12BindingGiven.

@Test
public void addServerWithSOAP12BindingGiven() throws Exception {
    Server server = createServerStub(SERVICE_QNAME_2, ENDPOINT_1, SOAP12_BINDING_ID, SOAP_HTTP_TRANSPORT_ID);
    CXFEndpointProvider epp = new CXFEndpointProvider(server, ENDPOINT_1, PROPERTIES);
    assertEquals(SOAP12, epp.getBinding());
}
Also used : Server(org.apache.cxf.endpoint.Server) Test(org.junit.Test)

Example 8 with Server

use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.

the class CXFEndpointProviderTest method addServerWithUnknownTransportGiven.

@Test
public void addServerWithUnknownTransportGiven() throws Exception {
    Server server = createServerStub(SERVICE_QNAME_2, ENDPOINT_1, SOAP11_BINDING_ID, "unknown");
    CXFEndpointProvider epp = new CXFEndpointProvider(server, ENDPOINT_1, PROPERTIES);
    assertEquals(TransportType.OTHER, epp.getTransport());
}
Also used : Server(org.apache.cxf.endpoint.Server) Test(org.junit.Test)

Example 9 with Server

use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.

the class CXFTestStubs method createServerStub.

public static Server createServerStub(Endpoint endpoint) {
    Server server = EasyMock.createNiceMock(Server.class);
    expect(server.getEndpoint()).andStubReturn(endpoint);
    EasyMock.replay(server);
    return server;
}
Also used : Server(org.apache.cxf.endpoint.Server)

Example 10 with Server

use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.

the class LocatorRegistrarTest method startListenForServer.

@Test
public void startListenForServer() throws Exception {
    Capture<ServerLifeCycleListener> slclCapture = addServerLifeCycleManager(bus1);
    addBusLifeCycleManager(bus1);
    List<Server> servers = Collections.emptyList();
    addRegisteredServers(bus1, servers);
    sl.register(CXF_ENDPOINT_1);
    replayAll();
    LocatorRegistrar locatorRegistrar = new LocatorRegistrar();
    locatorRegistrar.setServiceLocator(sl);
    locatorRegistrar.startListenForServers(bus1);
    ServerLifeCycleListener listener = slclCapture.getValue();
    listener.startServer(SERVER_1);
    verifyAll();
}
Also used : Server(org.apache.cxf.endpoint.Server) ServerLifeCycleListener(org.apache.cxf.endpoint.ServerLifeCycleListener) Test(org.junit.Test)

Aggregations

Server (org.apache.cxf.endpoint.Server)199 Test (org.junit.Test)119 ReferenceParametersType (org.apache.cxf.ws.addressing.ReferenceParametersType)54 ResourceManager (org.apache.cxf.ws.transfer.manager.ResourceManager)52 MemoryResourceManager (org.apache.cxf.ws.transfer.manager.MemoryResourceManager)50 Resource (org.apache.cxf.ws.transfer.resource.Resource)50 ExpressionType (org.apache.cxf.ws.transfer.dialect.fragment.ExpressionType)47 ValueType (org.apache.cxf.ws.transfer.dialect.fragment.ValueType)44 Element (org.w3c.dom.Element)44 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)33 Put (org.apache.cxf.ws.transfer.Put)33 Fragment (org.apache.cxf.ws.transfer.dialect.fragment.Fragment)32 Service (org.apache.cxf.service.Service)27 Bus (org.apache.cxf.Bus)25 PutResponse (org.apache.cxf.ws.transfer.PutResponse)25 Endpoint (org.apache.cxf.endpoint.Endpoint)21 ArrayList (java.util.ArrayList)18 QName (javax.xml.namespace.QName)18 ServerRegistry (org.apache.cxf.endpoint.ServerRegistry)18 Document (org.w3c.dom.Document)18