Examples of DynamicClientFactory


Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

        assertNotNull(wsdl);
        String wsdlUrl = null;
        wsdlUrl = wsdl.toURI().toString();

        //TODO test fault exceptions
        DynamicClientFactory dcf = DynamicClientFactory.newInstance();
        Client client = dcf.createClient(wsdlUrl, serviceName, portName);
        updateAddressPort(client, PORT);
        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.
        Map<String, Object> jaxbContextProperties = new HashMap<String, Object>();
        jaxbContextProperties.put("com.sun.xml.bind.defaultNamespaceRemap", "uri:ultima:thule");
        dcf.setJaxbContextProperties(jaxbContextProperties);
        client = dcf.createClient(wsdlUrl, serviceName, portName);
        updateAddressPort(client, PORT);
        client.invoke("greetMe", "test");       
        result = client.invoke("sayHi");
        assertNotNull("no response received from service", result);
        assertEquals("Bonjour", result[0]);
View Full Code Here

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

   
    protected Client createClient() throws Exception
    {
        synchronized (CLIENT_CREATION_LOCK)
        {
            DynamicClientFactory cf = DynamicClientFactory.newInstance(getBus());
            return cf.createClient(getWsdlLocation(),
               (service == null ? null : QName.valueOf(service)),
               (getPort() == null ? null : QName.valueOf(getPort())));
        }
    }
View Full Code Here

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

        assertEquals("Anullb", s);       
    }
   
    @Test
    public void testDynamicClient() throws Exception {
        DynamicClientFactory dcf = DynamicClientFactory.newInstance();
        Client client = dcf.createClient("http://localhost:" + PORT + "/jaxwsAndAegisSports?wsdl");

        Object r = client.invoke("getAttributeBean")[0];
        Method getAddrPlainString = r.getClass().getMethod("getAttrPlainString");
        String s = (String)getAddrPlainString.invoke(r);
View Full Code Here

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

        assertNotNull(wsdl);
        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

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

        assertNotNull(wsdl);
        String wsdlUrl = null;
        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
        // 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

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

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

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

        assertNotNull(wsdl);
        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

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

        assertNotNull(wsdl);
        String wsdlUrl = null;
        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
        // 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

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

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

Examples of org.apache.cxf.endpoint.dynamic.DynamicClientFactory

        assertNotNull(wsdl);
        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
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.