Package org.apache.hello_world_soap_http

Examples of org.apache.hello_world_soap_http.Greeter.greetMe()


    public void testBogusAddress() throws Exception {
        String realAddress = "http://localhost:" + BOGUS_REAL_PORT + "/SoapContext/SoapPort";
        SOAPServiceBogusAddressTest service = new SOAPServiceBogusAddressTest();
        Greeter greeter = service.getSoapPort();
        try {
            greeter.greetMe("test");
            fail("Should fail");
        } catch (WebServiceException f) {
            // expected
        }
View Full Code Here


       
       
        BindingProvider bp = (BindingProvider)greeter;
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   realAddress);
        greeter.greetMe("test");

        //should persist
        greeter.greetMe("test");

        bp.getRequestContext().remove(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
View Full Code Here

        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   realAddress);
        greeter.greetMe("test");

        //should persist
        greeter.greetMe("test");

        bp.getRequestContext().remove(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
       
        try {
            greeter.greetMe("test");
View Full Code Here

        greeter.greetMe("test");

        bp.getRequestContext().remove(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
       
        try {
            greeter.greetMe("test");
            fail("Should fail");
        } catch (WebServiceException f) {
            // expected
        }
View Full Code Here

        assertNotNull(resp);
        assertEquals("CXF", resp.getCompany());
       
        Greeter g = service.getGreeterPort();
        updateAddressPort(g, PORT);
        String result = g.greetMe("CXF");
        assertEquals("Hello CXF", result);
    }

    @Test
    public void testProxy() throws Exception {
View Full Code Here

    public void testServerAsync() throws Exception {
        Service service = Service.create(serviceName);
        service.addPort(fakePortName, javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING,
            "http://localhost:" + PORT + "/SoapContext/AsyncSoapPort");
        Greeter greeter = service.getPort(fakePortName, Greeter.class);
        String resp = greeter.greetMe("World");
        assertEquals("Hello World", resp);
    }

    @Test
    public void testEchoProviderAsync() throws Exception {
View Full Code Here

        Service service = Service.create(wsdlURL, SERVICE_NAME);
        Greeter port = service.getPort(PORT_NAME, Greeter.class);

        System.out.println("Invoking greetMe...");
        try {
            String resp = port.greetMe(System.getProperty("user.name"));
            System.out.println("Server responded with: " + resp);
            System.out.println();

        } catch (Exception e) {
            System.out.println("Invocation failed with the following: " + e.getCause());
View Full Code Here

        assertNotNull(service);

        Greeter greeter = service.getPort(portName, Greeter.class);

        try {
            greeter.greetMe("test");
           
            String reply = greeter.sayHi();
            assertNotNull("no response received from service", reply);
            assertEquals("Bonjour", reply);
        } catch (UndeclaredThrowableException ex) {
View Full Code Here

                        "http://localhost:9009/SoapContext/SoapPort");
        Greeter greeter = service.getPort(fakePortName, Greeter.class);

        String response = new String("Bonjour");
        try {
            greeter.greetMe("test");
            String reply = greeter.sayHi();
            assertNotNull("no response received from service", reply);
            assertEquals(response, reply);
        } catch (UndeclaredThrowableException ex) {
            throw (Exception)ex.getCause();
View Full Code Here

            "http://localhost:9000/SoapContext/SoapPort");
        Greeter greeter = service.getPort(fakePortName, Greeter.class);

        String response = new String("Bonjour");
        try {
            greeter.greetMe("test");
            String reply = greeter.sayHi();
            assertNotNull("no response received from service", reply);
            assertEquals(response, reply);
        } catch (UndeclaredThrowableException ex) {
            throw (Exception)ex.getCause();
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.