Search in sources :

Example 1 with CxfRsEndpoint

use of org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint in project camel by apache.

the class CxfRsEndpointBeansTest method testCxfBusInjection.

@Test
public void testCxfBusInjection() {
    CxfRsEndpoint serviceEndpoint = context.getEndpoint("cxfrs:bean:serviceEndpoint", CxfRsEndpoint.class);
    CxfRsEndpoint routerEndpoint = context.getEndpoint("cxfrs:bean:routerEndpoint", CxfRsEndpoint.class);
    JAXRSServerFactoryBean server = routerEndpoint.createJAXRSServerFactoryBean();
    JAXRSClientFactoryBean client = serviceEndpoint.createJAXRSClientFactoryBean();
    assertEquals("These cxfrs endpoints don't share the same bus", server.getBus().getId(), client.getBus().getId());
}
Also used : CxfRsEndpoint(org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint) JAXRSClientFactoryBean(org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean) JAXRSServerFactoryBean(org.apache.cxf.jaxrs.JAXRSServerFactoryBean) Test(org.junit.Test)

Aggregations

CxfRsEndpoint (org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint)1 JAXRSServerFactoryBean (org.apache.cxf.jaxrs.JAXRSServerFactoryBean)1 JAXRSClientFactoryBean (org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean)1 Test (org.junit.Test)1