Examples of Greeter


Examples of com.talend.examples.interceptors.Greeter

        final String address = "http://localhost:" + getPort() + "/services/InterceptorExample";

        Service service = Service.create(SERVICE_NAME);
        service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, address);

        Greeter greeter = service.getPort(Greeter.class);
       
        // Use CXF API's to grab the underlying Client object and add
        // the DemoInterceptor's to it
        org.apache.cxf.endpoint.Client client = ClientProxy.getClient(greeter);
        DemoInterceptor.addInterceptors(client.getEndpoint().getBinding());

        System.out.println("Invoking greetMe...");
        System.out.println("server responded with: " + greeter.greetMe(System.getProperty("user.name")));
        System.out.println();
    }
View Full Code Here

Examples of demo.common.Greeter

public class Client {

  public static void main(String[] args) throws Exception {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/client.xml");
    Greeter client = (Greeter) context.getBean("greeterService");

    String response = null;
    for (int i = 0; i < 10; i++) {
      System.out.println("BEGIN...");

      response = client.greetMe("MyName#" + i);
      System.out.println("Response from the service: ");
      System.out.println(response);
     
      System.out.println("END...");
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.dlwmin.sei.Greeter

        return getTestSetup(new TestSuite(DLWMinTests.class));
    }

    private Greeter getProxy(String action) {
        Service service = Service.create(QNAME_SERVICE);
        Greeter proxy = service.getPort(QNAME_PORT, Greeter.class);
        BindingProvider p = (BindingProvider) proxy;
        p.getRequestContext().put(
                BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
        p.getRequestContext().put(
                BindingProvider.SOAPACTION_URI_PROPERTY, action);
View Full Code Here

Examples of org.apache.camel.hello_world_soap_http.Greeter

    }
   
    @Test
    public void testInvokeService() throws Exception {
        Client client = new Client(getRouterAddress());
        Greeter greeter = client.getClient();
        assertEquals("Get a wrong response", "Hello Security", greeter.greetMe("Security"));
    }
View Full Code Here

Examples of org.apache.cxf.greeter_control.Greeter

       
        // avoid early client resends
        greeterBus.getExtension(RMManager.class).getRMAssertion().getBaseRetransmissionInterval()
            .setMilliseconds(new BigInteger("60000"));
        GreeterService gs = new GreeterService();
        Greeter greeter = gs.getGreeterPort();
        updateAddressPort(greeter, PORT);
       
        LOG.fine("Created greeter client.");
        ConnectionHelper.setKeepAliveConnection(greeter, true);

        Client c = ClientProxy.getClient(greeter);
        HTTPConduit hc = (HTTPConduit)(c.getConduit());
        HTTPClientPolicy cp = hc.getClient();
        cp.setDecoupledEndpoint("http://localhost:" + DECOUPLE_PORT + "/decoupled_endpoint");

        out = new OutMessageRecorder();
        in = new InMessageRecorder();

        greeterBus.getOutInterceptors().add(out);
        greeterBus.getInInterceptors().add(in);
       
        LOG.fine("Configured greeter client.");

        Response<GreetMeResponse> responses[] = cast(new Response[3]);
       
        responses[0] = greeter.greetMeAsync("one");
        responses[1] = greeter.greetMeAsync("two");
        responses[2] = greeter.greetMeAsync("three");
       
        verifyMissingResponse(responses);
        control.stopGreeter(SERVER_LOSS_CFG);
        LOG.fine("Stopped greeter server");
      
View Full Code Here

Examples of org.apache.cxf.hello_world.discovery.Greeter

        client.close();
       
        GreeterService service = new GreeterService();
        //loop through all of them and have them greet me.
        for (EndpointReference ref : references) {
            Greeter g = service.getPort(ref, Greeter.class);
            System.out.println(g.greetMe("World"));
        }      
    }
View Full Code Here

Examples of org.apache.cxf.hello_world_corba.Greeter

        System.getProperties().remove("com.sun.CORBA.POA.ORBPersistentServerPort");
        URL wsdlUrl = this.getClass().getResource("/wsdl_systest/hello_world_corba.wsdl");
        new SpringBusFactory().createBus("org/apache/cxf/systest/corba/hello_world_client.xml");

        GreeterCORBAService gcs = new GreeterCORBAService(wsdlUrl, SERVICE_NAME);
        Greeter port = gcs.getGreeterCORBAPort();


        String output = port.greetMe("Betty");
        assertTrue("Unexpected returned string: " + output, "Hello Betty".equals(output));
    }
View Full Code Here

Examples of org.apache.cxf.hello_world_soap_http.Greeter

            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");

            }

            bus.shutdown(true);
View Full Code Here

Examples of org.apache.greeter_control.Greeter

        if (name == null) {
            name = "Unknown";
        }
        InitialContext ctx = new InitialContext();
        Service service = (Service)ctx.lookup("java:comp/env/services/Greeter");
        Greeter greeter = service.getPort(Greeter.class);
        System.out.println("WebService returned: " + greeter.greetMe(name));
    }
View Full Code Here

Examples of org.apache.hello_world.Greeter

    @Test
    public void testSimpleUDP() throws Exception {
        JaxWsProxyFactoryBean fact = new JaxWsProxyFactoryBean();
        fact.setAddress("udp://localhost:" + PORT);
        Greeter g = fact.create(Greeter.class);
        for (int x = 0; x < 5; x++) {
            assertEquals("Hello World", g.greetMe("World"));
        }
              
        ((java.io.Closeable)g).close();
    }
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.