Examples of Greeter


Examples of org.objectweb.hello_world_soap_http.Greeter

        }
       
        try {
            File wsdl = new File(args[0]);
            SOAPService service = new SOAPService(wsdl.toURL(), SERVICE_NAME);
            Greeter port = service.getSoapPort();

            implicitPropagation(port);

            explicitPropagation(port);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

        }

        File wsdl = new File(args[0]);
       
        SOAPService ss = new SOAPService(wsdl.toURL(), SERVICE_NAME);
        Greeter port = ss.getSoapPort();
        String resp;

        System.out.println("Invoking sayHi...");
        resp = port.sayHi();
        System.out.println("Server responded with: " + resp);
        System.out.println();

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

        System.out.println("Invoking greetMeOneWay...");
        port.greetMeOneWay(System.getProperty("user.name"));
        System.out.println("No response from server as method is OneWay");
        System.out.println();

        try {
            System.out.println("Invoking pingMe, expecting exception...");
            port.pingMe();
        } catch (PingMeFault ex) {
            System.out.println("Expected exception: PingMeFault has occurred.");
            System.out.println(ex.toString());
        }
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

            wsdlURL = new URL(args[0]);
        }
       
        System.out.println(wsdlURL);
        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
        Greeter port;
       
        if ((args[1] != null) && (args[1].equalsIgnoreCase("secure_user"))) {
            System.out.println("The secure_user credentials will be used for the invocation.");
            System.out.println();
            port = ss.getPort(SECURE_PORT_NAME, Greeter.class);
        } else if ((args[1] != null) && (args[1].equalsIgnoreCase("strict_secure_user"))) {
            String configurerProperty = "celtix.security.configurer"
                        + ".celtix.{http://objectweb.org/hello_world_soap_http}"
                        + "SOAPService/StrictSecurePort.http-client";
            String configurerClass = "demo.hw_https.common.DemoSecurityConfigurer";
            System.setProperty(configurerProperty, configurerClass);
            System.out.println("The strict_secure_user credentials will be used for the invocation.");
            System.out.println("Extra security data will be provided by the class, " + configurerClass
                               + " because the system property  " + configurerProperty
                               + " has been set.");
            System.out.println();
            port = ss.getPort(STRICT_SECURE_PORT_NAME, Greeter.class);
        } else {
            System.out.println("The insecure_user credentials will be used for the invocation.");
            System.out.println();
            port = ss.getPort(INSECURE_PORT_NAME, Greeter.class);
        }
       
        String resp;

        System.out.println("Invoking greetMe...");
        try {
            resp = port.greetMe(System.getProperty("user.name"));
            System.out.println("Server responded with: " + resp);
            System.out.println();
           
        } catch (Exception e) {
            System.out.println("Invocation to server failed with the following error : " + e.getCause());
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

        }
       
        try {
            File wsdl = new File(args[0]);
            SOAPService service = new SOAPService(wsdl.toURL(), SERVICE_NAME);
            Greeter port = service.getSoapPort();

            // make a sequence of 8 invocations
            for (int i = 0; i < 4; i++) {
                System.out.println("Invoking sayHi...");
                String resp = port.sayHi();
                System.out.println("Server responded with: " + resp + "\n");

                System.out.println("Invoking greetMeOneWay...");
                port.greetMeOneWay(USER_NAME);
                System.out.println("No response as method is OneWay\n");
            }

            // allow aynchronous resends to occur
            Thread.sleep(30 * 1000);
 
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

            wsdlURL = new URL(args[0]);
        }
       
        System.out.println(wsdlURL);
        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
        Greeter port = ss.getSoapPort();
        String resp;

        System.out.println("Invoking sayHi...");
        resp = port.sayHi();
        System.out.println("Server responded with: " + resp);
        System.out.println();

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

        System.out.println("Invoking greetMeOneWay...");
        port.greetMeOneWay(System.getProperty("user.name"));
        System.out.println("No response from server as method is OneWay");
        System.out.println();

        try {
            System.out.println("Invoking pingMe, expecting exception...");
            port.pingMe();
        } catch (PingMeFault ex) {
            System.out.println("Expected exception: PingMeFault has occurred.");
            System.out.println(ex.toString());
        }         
        System.exit(0);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

        assertEquals(0, handlers.size());
        final TestHandler dummyHandler = new TestHandler();
        handlers.add(dummyHandler);
        assertEquals(1, handlers.size());
       
        Greeter g = service.getPort(portName, Greeter.class);
        assertTrue(g instanceof BindingProvider);
       
        List<Handler> bindingHandlers = ((BindingProvider)g).getBinding().getHandlerChain();
        assertNotNull(bindingHandlers);
        assertEquals(1, bindingHandlers.size());
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

            wsdlURL = new URL(args[0]);
        }
       
        System.out.println(wsdlURL);
        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
        Greeter port = ss.getSoapPort();
        String resp;

        System.out.println("Invoking sayHi...");
        resp = port.sayHi();
        System.out.println("Server responded with: " + resp);
        System.out.println();

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

        System.out.println("Invoking greetMe with invalid length string, expecting exception...");
        try {
            resp = port.greetMe("Invoking greetMe with invalid length string, expecting exception...");
        } catch (ProtocolException e) {
            System.out.println("Expected exception has occurred: " + e.getClass().getName());
        }

        System.out.println();

        System.out.println("Invoking greetMeOneWay...");
        port.greetMeOneWay(System.getProperty("user.name"));
        System.out.println("No response from server as method is OneWay");
        System.out.println();

        try {
            System.out.println("Invoking pingMe, expecting exception...");
            port.pingMe();
        } catch (PingMeFault ex) {
            System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
        }         
        System.exit(0);
    }
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

            }

            File wsdl = new File(args[0]);
       
            HelloWorldService ss = new HelloWorldService(wsdl.toURL(), SERVICE_NAME);
            Greeter port = ss.getSoapPort();
            String resp;

            System.out.println("Invoking sayHi...");
            resp = port.sayHi();
            System.out.println("Server responded with: " + resp);
            System.out.println();

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

            System.out.println("Invoking greetMeOneWay...");
            port.greetMeOneWay(System.getProperty("user.name"));
            System.out.println("No response from server as method is OneWay");
            System.out.println();

            try {
                System.out.println("Invoking pingMe, expecting exception...");
                port.pingMe();
            } catch (PingMeFault ex) {
                System.out.println("Expected exception: PingMeFault has occurred.");
                System.out.println(ex.toString());
            }
        } catch (UndeclaredThrowableException ex) {
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

        }

        File wsdl = new File(args[0]);
       
        SOAPService ss = new SOAPService(wsdl.toURL(), SERVICE_NAME);
        Greeter port = ss.getSoapPort();
        String resp;

        System.out.println("Invoking sayHi...");
        resp = port.sayHi();
        System.out.println("Server responded with: " + resp);
        System.out.println();

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

        System.out.println("Invoking greetMeOneWay...");
        port.greetMeOneWay(System.getProperty("user.name"));
        System.out.println("No response from server as method is OneWay");
        System.out.println();

        try {
            System.out.println("Invoking pingMe, expecting exception...");
            port.pingMe();
        } catch (PingMeFault ex) {
            System.out.println("Expected exception: PingMeFault has occurred.");
            System.out.println(ex.toString());
        }         
        System.exit(0);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.Greeter

            SOAPService hwService = new SOAPService();
            assertNotNull(hwService);
            Iterator iter = hwService.getPorts();
            assertFalse("Should have no element", iter.hasNext());

            Greeter port = hwService.getSoapPort();
            assertNotNull(port);
            assertTrue("Should be a proxy class. "
                        + port.getClass().getName(),
                        Proxy.isProxyClass(port.getClass()));
           
            iter = hwService.getPorts();
            assertTrue("Should have one element", iter.hasNext());           
            assertEquals("Activated EndPoints are not the same", endpoint, iter.next());           
        } finally {
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.