Package org.apache.cxf.greeter_control

Examples of org.apache.cxf.greeter_control.GreeterService


        RMManager manager = bus.getExtension(RMManager.class);
        manager.getRMAssertion().getBaseRetransmissionInterval().setMilliseconds(new Long(2000));
       
        bus.getOutFaultInterceptors().add(out);
       
        GreeterService gs = new GreeterService();
        final Greeter greeter = gs.getGreeterPort();
        updateAddressPort(greeter, DecoupledClientServerTest.PORT);
        LOG.fine("Created greeter client.");
      
        ConnectionHelper.setKeepAliveConnection(greeter, true);
       
View Full Code Here


        BusFactory.setDefaultBus(greeterBus);
       
        // avoid early client resends
        greeterBus.getExtension(RMManager.class).getRMAssertion().getBaseRetransmissionInterval()
            .setMilliseconds(new Long(60000));
        GreeterService gs = new GreeterService();
        Greeter greeter = gs.getGreeterPort();
        updateAddressPort(greeter, PORT);
       
        LOG.fine("Created greeter client.");
        ConnectionHelper.setKeepAliveConnection(greeter, false, true);
View Full Code Here

        LOG.fine("Creating greeter client");
        SpringBusFactory bf = new SpringBusFactory();
        bus = bf.createBus("/org/apache/cxf/systest/ws/rm/persistent.xml");
        BusFactory.setDefaultBus(bus);

        GreeterService gs = new GreeterService();
        greeter = gs.getGreeterPort();
        updateAddressPort(greeter, PORT);
        ((BindingProvider)greeter).getRequestContext().put("schema-validation-enabled", Boolean.TRUE);

        out = new OutMessageRecorder();
        in = new InMessageRecorder();
View Full Code Here

        BusFactory.setDefaultBus(greeterBus);
        LOG.fine("Initialised greeter bus with configuration: " + cfgResource);
    }

    private void initProxy(Executor executor) {       
        GreeterService gs = new GreeterService();

        if (null != executor) {
            gs.setExecutor(executor);
        }
  
        greeter = gs.getGreeterPort();
        try {
            updateAddressPort(greeter, PORT);
        } catch (Exception e) {
            //ignore
        }
View Full Code Here

        bus.getOutFaultInterceptors().add(out);
       
        bus.getExtension(RMManager.class).getRMAssertion().getBaseRetransmissionInterval()
        .setMilliseconds(new BigInteger("5000"));
       
        GreeterService gs = new GreeterService();
        final Greeter greeter = gs.getGreeterPort();
        updateAddressPort(greeter, PORT);
        LOG.fine("Created greeter client.");
      
        ConnectionHelper.setKeepAliveConnection(greeter, true);
        RMManager manager = bus.getExtension(RMManager.class);
View Full Code Here

   
   
    @Test   
    public void testInvocationWithSession() throws Exception {

        GreeterService service = new GreeterService();
        assertNotNull(service);

        try {
            Greeter greeter = service.getGreeterPort();
           
            BindingProvider bp = (BindingProvider)greeter;
            updateAddressPort(bp, PORT);
            bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
           
View Full Code Here

    }
   
    @Test   
    public void testInvocationWithoutSession() throws Exception {

        GreeterService service = new GreeterService();
        assertNotNull(service);

        try {
            Greeter greeter = service.getGreeterPort();
            updateAddressPort(greeter, PORT);

            String greeting = greeter.greetMe("Bonjour");
           
            assertNotNull("no response received from service", greeting);
View Full Code Here

    public void testInvocationWithSessionAnnotation() throws Exception {
        doSessionsTest("http://localhost:" + PORT + "/Stateful2");
    }
    @Test   
    public void testInvocationWithPerRequestAnnotation() throws Exception {
        GreeterService service = new GreeterService();
        assertNotNull(service);

        Greeter greeter = service.getGreeterPort();
        BindingProvider bp = (BindingProvider)greeter;
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   "http://localhost:" + PORT + "/PerRequest");
        bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
        String result = greeter.greetMe("World");
View Full Code Here

        assertEquals("Hello World", result);
        assertEquals("Bonjour default", greeter.sayHi());
    }
    @Test   
    public void testInvocationWithSpringBeanAnnotation() throws Exception {
        GreeterService service = new GreeterService();
        assertNotNull(service);

        Greeter greeter = service.getGreeterPort();
        BindingProvider bp = (BindingProvider)greeter;
        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                   "http://localhost:" + PORT + "/SpringBean");
        bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
        String result = greeter.greetMe("World");
View Full Code Here

        assertEquals("Hello World", result);
        assertEquals("Bonjour World", greeter.sayHi());
    }
   
    private void doSessionsTest(String url) {
        GreeterService service = new GreeterService();
        assertNotNull(service);

        Greeter greeter = service.getGreeterPort();
        Greeter greeter2 = service.getGreeterPort();
       
        BindingProvider bp = (BindingProvider)greeter;

        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
        bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
View Full Code Here

TOP

Related Classes of org.apache.cxf.greeter_control.GreeterService

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.