Package org.apache.hello_world

Examples of org.apache.hello_world.Greeter


    }

    @Test
    public void testBasicConnection() throws Exception {
        startServer("Mortimer");
        Greeter mortimer = getMortimerGreeter();

        String answer = mortimer.sayHi();
        assertTrue("Unexpected answer: " + answer,
                "Bonjour from Mortimer".equals(answer));
    }
View Full Code Here


    }

    @Test
    public void testLogLevelIssueCXF3466() throws Exception {
        startServer("Mortimer");
        Greeter mortimer = getMortimerGreeter();
        Logger rootLogger = LogManager.getLogManager().getLogger("");
        Level oldLevel = rootLogger.getLevel();
        rootLogger.setLevel(Level.FINE);
        try {
            // Will throw exception Stream is closed if bug is present
            mortimer.sayHi();
        } finally {
            rootLogger.setLevel(oldLevel);
        }
    }
View Full Code Here

        assertNotNull("WSDL is null", wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull("Service is null", service);

        Greeter rethwel = service.getPort(rethwelQ, Greeter.class);
        assertNotNull("Port is null", rethwel);
        updateAddressPort(rethwel, PORT5);

        String answer = null;
        try {
            answer = rethwel.sayHi();
            fail("Redirect didn't fail. Got answer: " + answer);
        } catch (Exception e) {
            //e.printStackTrace();
        }
       
View Full Code Here

        assertNotNull("WSDL is null", wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull("Service is null", service);

        Greeter rethwel = service.getPort(rethwelQ, Greeter.class);
        updateAddressPort(rethwel, PORT4);
        assertNotNull("Port is null", rethwel);
       
        String answer = rethwel.sayHi();
        assertTrue("Unexpected answer: " + answer,
                "Bonjour from Mortimer".equals(answer));
    }
View Full Code Here

    //
    public final void testSuccessfulCall(String address) throws Exception {
        URL url = SOAPService.WSDL_LOCATION;
        SOAPService service = new SOAPService(url, SOAPService.SERVICE);
        assertNotNull("Service is null", service);  
        final Greeter port = service.getHttpsPort();
        assertNotNull("Port is null", port);
       
        BindingProvider provider = (BindingProvider)port;
        provider.getRequestContext().put(
              BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
              address);
       
        assertEquals(port.greetMe("Kitty"), "Hello Kitty");
    }
View Full Code Here

   
    public final void testFailedCall(String address) throws Exception {
        URL url = SOAPService.WSDL_LOCATION;
        SOAPService service = new SOAPService(url, SOAPService.SERVICE);
        assertNotNull("Service is null", service);  
        final Greeter port = service.getHttpsPort();
        assertNotNull("Port is null", port);

        BindingProvider provider = (BindingProvider)port;
        provider.getRequestContext().put(
                BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                address);

        try {
            assertEquals(port.greetMe("Kitty"), "Hello Kitty");
            fail("Failure expected");
        } catch (javax.xml.ws.soap.SOAPFaultException ex) {
            // expected
        } catch (javax.xml.ws.WebServiceException ex) {
            // expected
View Full Code Here

        assertNotNull("WSDL is null", wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull("Service is null", service);

        Greeter mortimer = service.getPort(mortimerQ, Greeter.class);
        assertNotNull("Port is null", mortimer);
        updateAddressPort(mortimer, PORT0);
        return mortimer;
    }
View Full Code Here

    }

    @Test
    public void testBasicConnection() throws Exception {
        startServer("Mortimer");
        Greeter mortimer = getMortimerGreeter();

        String answer = mortimer.sayHi();
        assertTrue("Unexpected answer: " + answer,
                "Bonjour from Mortimer".equals(answer));
    }
View Full Code Here

    }

    @Test
    public void testLogLevelIssueCXF3466() throws Exception {
        startServer("Mortimer");
        Greeter mortimer = getMortimerGreeter();
        Logger rootLogger = LogManager.getLogManager().getLogger("");
        Level oldLevel = rootLogger.getLevel();
        rootLogger.setLevel(Level.FINE);
        try {
            // Will throw exception Stream is closed if bug is present
            mortimer.sayHi();
        } finally {
            rootLogger.setLevel(oldLevel);
        }
    }
View Full Code Here

        assertNotNull("WSDL is null", wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull("Service is null", service);

        Greeter rethwel = service.getPort(rethwelQ, Greeter.class);
        assertNotNull("Port is null", rethwel);
        updateAddressPort(rethwel, PORT5);

        String answer = null;
        try {
            answer = rethwel.sayHi();
            fail("Redirect didn't fail. Got answer: " + answer);
        } catch (Exception e) {
            //e.printStackTrace();
        }
       
View Full Code Here

TOP

Related Classes of org.apache.hello_world.Greeter

Copyright © 2018 www.massapicom. 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.