use of javax.xml.ws.RespectBindingFeature in project cxf by apache.
the class RespectBindingFeatureClientServerTest method testRespectBindingFeatureFalse.
@Test
public void testRespectBindingFeatureFalse() throws Exception {
startServers("/wsdl_systest/cxf2006.wsdl");
GreeterRPCLit greeter = service.getPort(portName, GreeterRPCLit.class, new RespectBindingFeature(false));
updateAddressPort(greeter, PORT);
assertEquals("Bonjour", greeter.sayHi());
}
use of javax.xml.ws.RespectBindingFeature in project cxf by apache.
the class RespectBindingFeatureClientServerTest method testOperationRespectBindingFeature.
@Test
public void testOperationRespectBindingFeature() throws Exception {
startServers("/wsdl_systest/cxf_operation_respectbing.wsdl");
try {
GreeterRPCLit greeter = service.getPort(portName, GreeterRPCLit.class, new RespectBindingFeature(true));
updateAddressPort(greeter, PORT);
greeter.greetMe("hello");
fail("WebServiceException is expected");
} catch (Exception ex) {
assertTrue("WebServiceException is expected", ex instanceof javax.xml.ws.WebServiceException);
assertTrue("RespectBindingFeature message is expected: " + ex.getMessage(), ex.getMessage().indexOf("extension with required=true attribute") > -1);
}
}
use of javax.xml.ws.RespectBindingFeature in project cxf by apache.
the class RespectBindingFeatureClientServerTest method testOperationOutputRespectBindingFeature.
@Test
public void testOperationOutputRespectBindingFeature() throws Exception {
startServers("/wsdl_systest/cxf_operation_output_respectbing.wsdl");
try {
GreeterRPCLit greeter = service.getPort(portName, GreeterRPCLit.class, new RespectBindingFeature(true));
updateAddressPort(greeter, PORT);
greeter.greetMe("hello");
fail("WebServiceException is expected");
} catch (Exception ex) {
assertTrue("WebServiceException is expected", ex instanceof javax.xml.ws.WebServiceException);
assertTrue("RespectBindingFeature message is expected: " + ex.getMessage(), ex.getMessage().indexOf("extension with required=true attribute") > -1);
}
}
use of javax.xml.ws.RespectBindingFeature in project cxf by apache.
the class RespectBindingFeatureClientServerTest method testRespectBindingFeature.
@Test
public void testRespectBindingFeature() throws Exception {
startServers("/wsdl_systest/cxf2006.wsdl");
try {
GreeterRPCLit greeter = service.getPort(portName, GreeterRPCLit.class, new RespectBindingFeature(true));
updateAddressPort(greeter, PORT);
greeter.greetMe("hello");
fail("WebServiceException is expected");
} catch (Exception ex) {
assertTrue("WebServiceException is expected", ex instanceof javax.xml.ws.WebServiceException);
assertTrue("RespectBindingFeature message is expected: " + ex.getMessage(), ex.getMessage().indexOf("extension with required=true attribute") > -1);
}
}
Aggregations