Package org.apache.cxf.greeter_control

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


   
    @Test
    public void testFaultMessage() throws Exception {
        Greeter greeter = getGreeter();
        try {
            greeter.sayHi();
            fail("Should throw Exception!");
        } catch (SOAPFaultException ex) {
            assertEquals("sayHiFault Caused by: Get a wrong name <sayHi>", ex.getMessage());
            StackTraceElement[] elements = ex.getCause().getStackTrace();
            assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl11",
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

   
    @Test
    public void testFaultMessage() throws Exception {
        Greeter greeter = getGreeter();
        try {
            greeter.sayHi();
            fail("Should throw Exception!");
        } catch (SOAPFaultException ex) {
            assertEquals("sayHiFault Caused by: Get a wrong name <sayHi>", ex.getMessage());
            StackTraceElement[] elements = ex.getCause().getStackTrace();
            assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl11",
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

       
        // 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

   
    @Test
    public void testFaultMessage() throws Exception {
        Greeter greeter = getGreeter();
        try {
            greeter.sayHi();
            fail("Should throw Exception!");
        } catch (SOAPFaultException ex) {
            assertEquals("sayHiFault Caused by: Get a wrong name <sayHi>", ex.getMessage());
            StackTraceElement[] elements = ex.getCause().getStackTrace();
            assertEquals("org.apache.cxf.systest.soapfault.details.GreeterImpl11",
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());
    }
   
    private void doSessionsTest(String url) {
        GreeterService service = new GreeterService();
        assertNotNull(service);
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.