Package org.apache.cxf.hello_world_soap_http

Examples of org.apache.cxf.hello_world_soap_http.Greeter


            bf.setDefaultBus(bus);

            bus.getOutInterceptors().add(new MessageLossSimulator());

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Daisy"};
            // make a sequence of 4 invocations
            for (int i = 0; i < 4; i++) {
                System.out.println("Invoking greetMeOneWay...");
                port.greetMeOneWay(names[i]);
                System.out.println("No response as method is OneWay\n");
            }

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


            inProperties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_TEXT);
            inProperties.setCallbackHandler(new UTPasswordCallback());
           
            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();
            org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);
            client.getInInterceptors().add(new WSS4JStaxInInterceptor(inProperties));
            client.getOutInterceptors().add(new WSS4JStaxOutInterceptor(properties));

            String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
            // make a sequence of 4 invocations
            for (int i = 0; i < 4; i++) {
                System.out.println("Invoking greetMe...");
                String response = port.greetMe(names[i]);
                System.out.println("response: " + response + "\n");

            }
            if (port instanceof Closeable) {
                ((Closeable)port).close();
View Full Code Here

            inProps.put("passwordCallbackClass", "demo.wssec.client.UTPasswordCallback");

            bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
            // make a sequence of 4 invocations
            for (int i = 0; i < 4; i++) {
                System.out.println("Invoking greetMe...");
                String response = port.greetMe(names[i]);
                System.out.println("response: " + response + "\n");

            }
            if (port instanceof Closeable) {
                ((Closeable)port).close();
View Full Code Here

            coverageChecker.setSignTimestamp(true);
            coverageChecker.setEncryptBody(true);
            bus.getInInterceptors().add(coverageChecker);

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Sachin Tendulkar"};
            // make a sequence of 4 invocations
            for (int i = 0; i < 4; i++) {
                System.out.println("Invoking greetMe...");
                String response = port.greetMe(names[i]);
                System.out.println("response: " + response + "\n");
            }

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

            // Check to make sure that the SOAP Body and Timestamp were signed
            DefaultCryptoCoverageChecker coverageChecker = new DefaultCryptoCoverageChecker();
            bus.getInInterceptors().add(coverageChecker);

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
            // make a sequence of 4 invocations
            for (int i = 0; i < 4; i++) {
                System.out.println("Invoking greetMe...");
                String response = port.greetMe(names[i]);
                System.out.println("response: " + response + "\n");
            }

            if (port instanceof Closeable) {
                ((Closeable)port).close();
View Full Code Here

TOP

Related Classes of org.apache.cxf.hello_world_soap_http.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.