Search in sources :

Example 1 with BindingConfiguration

use of org.apache.cxf.binding.BindingConfiguration in project camel by apache.

the class CxfConsumerSoap12Test method testCxfEndpointBeanDefinitionParser.

@Test
public void testCxfEndpointBeanDefinitionParser() {
    CxfEndpoint routerEndpoint = context.getEndpoint("routerEndpoint", CxfEndpoint.class);
    assertEquals("Got the wrong endpoint address", routerEndpoint.getAddress(), "http://localhost:" + CXFTestSupport.getPort1() + "/CxfConsumerSoap12Test/router");
    assertEquals("Got the wrong endpont service class", "org.apache.hello_world_soap_http.Greeter", routerEndpoint.getServiceClass().getName());
    BindingConfiguration binding = routerEndpoint.getBindingConfig();
    assertTrue("Got no soap binding", binding instanceof SoapBindingConfiguration);
    assertEquals("Got the wrong soap version", "http://schemas.xmlsoap.org/wsdl/soap12/", ((SoapBindingConfiguration) binding).getVersion().getBindingId());
    assertTrue("Mtom not enabled", ((SoapBindingConfiguration) binding).isMtomEnabled());
}
Also used : SoapBindingConfiguration(org.apache.cxf.binding.soap.SoapBindingConfiguration) CxfEndpoint(org.apache.camel.component.cxf.CxfEndpoint) SoapBindingConfiguration(org.apache.cxf.binding.soap.SoapBindingConfiguration) BindingConfiguration(org.apache.cxf.binding.BindingConfiguration) Test(org.junit.Test)

Aggregations

CxfEndpoint (org.apache.camel.component.cxf.CxfEndpoint)1 BindingConfiguration (org.apache.cxf.binding.BindingConfiguration)1 SoapBindingConfiguration (org.apache.cxf.binding.soap.SoapBindingConfiguration)1 Test (org.junit.Test)1