Search in sources :

Example 6 with RespectBindingFeature

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());
}
Also used : GreeterRPCLit(org.apache.hello_world_rpclit.GreeterRPCLit) RespectBindingFeature(javax.xml.ws.RespectBindingFeature) Test(org.junit.Test)

Example 7 with RespectBindingFeature

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);
    }
}
Also used : GreeterRPCLit(org.apache.hello_world_rpclit.GreeterRPCLit) RespectBindingFeature(javax.xml.ws.RespectBindingFeature) Test(org.junit.Test)

Example 8 with RespectBindingFeature

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);
    }
}
Also used : GreeterRPCLit(org.apache.hello_world_rpclit.GreeterRPCLit) RespectBindingFeature(javax.xml.ws.RespectBindingFeature) Test(org.junit.Test)

Example 9 with RespectBindingFeature

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);
    }
}
Also used : GreeterRPCLit(org.apache.hello_world_rpclit.GreeterRPCLit) RespectBindingFeature(javax.xml.ws.RespectBindingFeature) Test(org.junit.Test)

Aggregations

RespectBindingFeature (javax.xml.ws.RespectBindingFeature)9 GreeterRPCLit (org.apache.hello_world_rpclit.GreeterRPCLit)5 Test (org.junit.Test)5 WebServiceFeature (javax.xml.ws.WebServiceFeature)4 ArrayList (java.util.ArrayList)3 AddressingFeature (javax.xml.ws.soap.AddressingFeature)3 MTOMFeature (javax.xml.ws.soap.MTOMFeature)3 com.sun.enterprise.deployment (com.sun.enterprise.deployment)1 ReliabilityConfig (com.sun.enterprise.deployment.runtime.ws.ReliabilityConfig)1 WSBinding (com.sun.xml.ws.api.WSBinding)1 SchemaValidationFeature (com.sun.xml.ws.developer.SchemaValidationFeature)1 StreamingAttachmentFeature (com.sun.xml.ws.developer.StreamingAttachmentFeature)1 ReliableMessagingFeatureBuilder (com.sun.xml.ws.rx.rm.api.ReliableMessagingFeatureBuilder)1 ServletAdapter (com.sun.xml.ws.transport.http.servlet.ServletAdapter)1 ServletAdapterList (com.sun.xml.ws.transport.http.servlet.ServletAdapterList)1 Annotation (java.lang.annotation.Annotation)1 MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1 Collection (java.util.Collection)1 Iterator (java.util.Iterator)1