Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.Client


        String wsdlUrl = null;
        wsdlUrl = wsdl.toURI().toString();
        CXFBusFactory busFactory = new CXFBusFactory();
        Bus bus = busFactory.createBus();
        DynamicClientFactory dynamicClientFactory = DynamicClientFactory.newInstance(bus);
        Client client = dynamicClientFactory.createClient(wsdlUrl);
        assertNotNull(client);
    }
View Full Code Here


            assertEquals("Hello BJ", s);
            bp.getRequestContext().remove(BindingProvider.USERNAME_PROPERTY);
            bp.getRequestContext().remove(BindingProvider.PASSWORD_PROPERTY);
           
            //try setting on the conduit directly
            Client client = ClientProxy.getClient(greeter);
            HTTPConduit httpConduit = (HTTPConduit)client.getConduit();
            AuthorizationPolicy policy = new AuthorizationPolicy();
            policy.setUserName("BJ2");
            policy.setPassword("pswd");
            httpConduit.setAuthorization(policy);
           
View Full Code Here

            fail("Can't get the hello_world.wsdl url");           
        }
        try {
            //TODO test fault exceptions
            DynamicClientFactory dcf = DynamicClientFactory.newInstance();
            Client client = dcf.createClient(wsdlUrl, serviceName, portName);
            client.invoke("greetMe", "test");       
            Object[] result = client.invoke("sayHi");
            assertNotNull("no response received from service", result);
            assertEquals("Bonjour", result[0]);
        } catch (Exception e) {           
            e.printStackTrace();
            fail("There is some excpetion happened ");
View Full Code Here

        assertNotNull(manager);
       
        RMStore store = manager.getStore();
        assertNotNull(store);
       
        Client client = ClientProxy.getClient(greeter);
        String id = RMUtils.getEndpointIdentifier(client.getEndpoint());
       
        Collection<DestinationSequence> dss =
            store.getDestinationSequences(id);
        assertEquals(1, dss.size());
       
View Full Code Here

        assertNotNull(manager);
       
        RMStore store = manager.getStore();
        assertNotNull(store);
       
        Client client = ClientProxy.getClient(greeter);
        String id = RMUtils.getEndpointIdentifier(client.getEndpoint());
       
        Collection<DestinationSequence> dss =
            store.getDestinationSequences(id);
        assertEquals(1, dss.size());
       
View Full Code Here

        final Greeter greeter = gs.getGreeterPort();
        LOG.fine("Created greeter client.");

        ConnectionHelper.setKeepAliveConnection(greeter, true);

        Client client = ClientProxy.getClient(greeter);
        List<ServiceInfo> sis = client.getEndpoint().getService().getServiceInfos();
       
        ServiceInfo si = sis.get(0);
        Policy p = si.getExtensor(Policy.class);
        assertNotNull(p);
       
View Full Code Here

   
   
   
    // we just verify the configurations are loaded successfully
    private void verifyBethalClient(Greeter bethal) {
        Client client = ClientProxy.getClient(bethal);
        HTTPConduit http =
            (HTTPConduit) client.getConduit();
       
        HTTPClientPolicy httpClientPolicy = http.getClient();
        assertEquals("the httpClientPolicy's autoRedirect should be true",
                     true, httpClientPolicy.isAutoRedirect());
        TLSClientParameters tlsParaments = http.getTlsClientParameters();
View Full Code Here

        Greeter bethal = service.getPort(bethalQ, Greeter.class);
        assertNotNull("Port is null", bethal);
       
        // Okay, I'm sick of configuration files.
        // This also tests dynamic configuration of the conduit.
        Client client = ClientProxy.getClient(bethal);
        HTTPConduit http =
            (HTTPConduit) client.getConduit();
       
        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
       
        httpClientPolicy.setAutoRedirect(false);
        // If we set any name, but Edward, Mary, or George,
View Full Code Here

        Greeter poltim = service.getPort(poltimQ, Greeter.class);
        assertNotNull("Port is null", poltim);
       
        // Okay, I'm sick of configuration files.
        // This also tests dynamic configuration of the conduit.
        Client client = ClientProxy.getClient(poltim);
        HTTPConduit http =
            (HTTPConduit) client.getConduit();
       
        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
       
        httpClientPolicy.setAutoRedirect(true);
       
View Full Code Here

        Greeter bethal = service.getPort(bethalQ, Greeter.class);
        assertNotNull("Port is null", bethal);
       
        // Okay, I'm sick of configuration files.
        // This also tests dynamic configuration of the conduit.
        Client client = ClientProxy.getClient(bethal);
        HTTPConduit http =
            (HTTPConduit) client.getConduit();
       
        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
       
        httpClientPolicy.setAutoRedirect(false);
        // If we set any name, but Edward, Mary, or George,
View Full Code Here

TOP

Related Classes of org.apache.cxf.endpoint.Client

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.