Package org.apache.cxf.endpoint

Examples of org.apache.cxf.endpoint.Client.invoke()


        Map<String, Object> jaxbContextProperties = new HashMap<String, Object>();
        jaxbContextProperties.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, "uri:ultima:thule");
        dcf.setJaxbContextProperties(jaxbContextProperties);
        client = dcf.createClient(wsdlUrl, serviceName, portName);
        client.invoke("greetMe", "test");       
        result = client.invoke("sayHi");
        assertNotNull("no response received from service", result);
        assertEquals("Bonjour", result[0]);
    }
   
    @Test
View Full Code Here


            client = createClient(bus, endpoint, protocol, c, replyTo);
        }
       
        BindingOperationInfo boi = bi.getOperation(oi);
        try {
            Object[] result = client.invoke(boi, params, context);
            if (result != null && result.length > 0) {
                return result[0];
            }
           
        } catch (Exception ex) { 
View Full Code Here

                    e.printStackTrace();
                }
            }
        });

        Object[] res = client.invoke("echo", content.toArray());
        assertNotNull(res);
        assertEquals(1, res.length);
        assertEquals("Hello", res[0]);

    }
View Full Code Here

        sfb.setBindingId(ObjectBindingFactory.BINDING_ID);
        sfb.setServiceClass(EchoImpl.class);
        sfb.setAddress("local://Echo");
        sfb.create();

        Object[] res = client.invoke("echo", new Object[] {"Hello"});
        assertNotNull(res);
        assertEquals(1, res.length);
        assertEquals("Hello", res[0]);
    }
View Full Code Here

        }
        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);
            System.out.println(result[0]);
            assertEquals("Bonjour", result[0]);
        } catch (Exception e) {           
View Full Code Here

        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);
            System.out.println(result[0]);
            assertEquals("Bonjour", result[0]);
        } catch (Exception e) {           
            e.printStackTrace();
View Full Code Here

        org.apache.cxf.ws.addressing.EndpointReferenceType replyTo = reliableEndpoint.getReplyTo();
        Client client = createClient(bus, endpoint, c, replyTo);
       
        BindingOperationInfo boi = bi.getOperation(oi);
        try {
            Object[] result = client.invoke(boi, params, context);
            if (result != null && result.length > 0) {
                return result[0];
            }
           
        } catch (Exception ex) {
View Full Code Here

        wsdlUrl = wsdl.toURI().toString();

        //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]);
        //TODO: the following isn't a real test. We need to test against a service
        // that would actually notice the difference. At least it ensures that
View Full Code Here

        //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]);
        //TODO: the following isn't a real test. We need to test against a service
        // that would actually notice the difference. At least it ensures that
        // specifying the property does not explode.
View Full Code Here

        // specifying the property does not explode.
        Map<String, Object> jaxbContextProperties = new HashMap<String, Object>();
        jaxbContextProperties.put(JAXBRIContext.DEFAULT_NAMESPACE_REMAP, "uri:ultima:thule");
        dcf.setJaxbContextProperties(jaxbContextProperties);
        client = dcf.createClient(wsdlUrl, serviceName, portName);
        client.invoke("greetMe", "test");       
        result = client.invoke("sayHi");
        assertNotNull("no response received from service", result);
        assertEquals("Bonjour", result[0]);
    }
   
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.