Package org.apache.cxf.greeter_control

Examples of org.apache.cxf.greeter_control.Greeter.sayHi()


       
        // sayHi - this operation has message policies that are incompatible with
        // the endpoint policies
      
        try {
            greeter.sayHi();
            fail("Did not receive expected PolicyException.");
        } catch (WebServiceException wex) {
            PolicyException ex = (PolicyException)wex.getCause();
            assertEquals("INCOMPATIBLE_HTTPCLIENTPOLICY_ASSERTIONS", ex.getCode());
        }
View Full Code Here


        // sayHi - this operation has message policies that are incompatible with
        // the endpoint policies

        try {
            greeter.sayHi();
            fail("Did not receive expected Exception.");
        } catch (WebServiceException wse) {
            SoapFault sf = (SoapFault)wse.getCause();
            assertEquals("Server", sf.getFaultCode().getLocalPart());
           
View Full Code Here

        // sayHi - this operation has message policies that are incompatible with
        // the endpoint policies

        try {
            greeter.sayHi();
            fail("Did not receive expected Exception.");
        } catch (WebServiceException wse) {
            SoapFault sf = (SoapFault)wse.getCause();
            assertEquals("Server", sf.getFaultCode().getLocalPart());
           
View Full Code Here

       
        // sayHi - this operation has message policies that are incompatible with
        // the endpoint policies
      
        try {
            greeter.sayHi();
            fail("Did not receive expected PolicyException.");
        } catch (WebServiceException wex) {
            PolicyException ex = (PolicyException)wex.getCause();
            assertEquals("INCOMPATIBLE_HTTPCLIENTPOLICY_ASSERTIONS", ex.getCode());
        }
View Full Code Here

        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   "http://localhost:" + PORT + "/PerRequest");
        bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
        String result = greeter.greetMe("World");
        assertEquals("Hello World", result);
        assertEquals("Bonjour default", greeter.sayHi());
    }
    @Test   
    public void testInvocationWithSpringBeanAnnotation() throws Exception {
        GreeterService service = new GreeterService();
        assertNotNull(service);
View Full Code Here

        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   "http://localhost:" + PORT + "/SpringBean");
        bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
        String result = greeter.greetMe("World");
        assertEquals("Hello World", result);
        assertEquals("Bonjour World", greeter.sayHi());
    }
   
    @Test   
    public void testOnewayInvocationWithSession() throws Exception {
View Full Code Here

        assertEquals("Hello World", result);
        assertEquals("Bonjour World", greeter.sayHi());
       
        result = greeter2.greetMe("Universe");
        assertEquals("Hello Universe", result);
        assertEquals("Bonjour Universe", greeter2.sayHi());
       
        //make sure session 1 was maintained
        assertEquals("Bonjour World", greeter.sayHi());
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.