Examples of CalculatorPortType


Examples of org.apache.cxf.calculator.CalculatorPortType

        URL wsdl = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl);
        CalculatorService service = new CalculatorService(wsdl, new QName(
                "http://apache.org/cxf/calculator", "CalculatorService"));
        CalculatorPortType port = service.getCalculatorPort();
        int ret = port.add(1, 2);
        assertEquals(ret, 3);
        try {
            port.add(1, -2);
            fail("should get exception since there is a negative arg");
        } catch (AddNumbersFault e) {
            assertEquals(e.getFaultInfo().getMessage(),
                    "Negative number cant be added!");
        }
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

    public void testMultiClient() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl);
        CalculatorService service = new CalculatorService(wsdl, new QName(
                "http://apache.org/cxf/calculator", "CalculatorService"));
        CalculatorPortType port = service.getCalculatorPort();
        MultiClientThread[] clients = new MultiClientThread[10];
        for (int i = 0; i < clients.length; i++) {
            clients[i] = new MultiClientThread(port);
        }
       
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

        URL wsdl1 = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl1);
       
        ServiceImpl service = new ServiceImpl(getBus(), wsdl1, SERVICE_1, ServiceImpl.class);

        CalculatorPortType cal = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
        assertNotNull(cal);
    }
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

        URL wsdl1 = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl1);
       
        ServiceImpl service = new ServiceImpl(getBus(), wsdl1, SERVICE_1, ServiceImpl.class);

        CalculatorPortType cal1 = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
        assertNotNull(cal1);
       
        ClientProxy cp = (ClientProxy)Proxy.getInvocationHandler(cal1);
        JAXBDataBinding db1 = (JAXBDataBinding) cp.getClient().getEndpoint().getService().getDataBinding();
        assertNotNull(db1);
       
        System.gc();
        System.gc();
        System.gc();
        System.gc();
       
        CalculatorPortType cal2 = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
        assertNotNull(cal2);

        cp = (ClientProxy)Proxy.getInvocationHandler(cal2);
        JAXBDataBinding db2 = (JAXBDataBinding) cp.getClient().getEndpoint().getService().getDataBinding();
        assertNotNull(db2);
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

        TestHandlerResolver resolver = new TestHandlerResolver();
        assertNull(resolver.getPortInfo());

        service.setHandlerResolver(resolver);
       
        CalculatorPortType cal = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
        assertNotNull(cal);

        PortInfo info = resolver.getPortInfo();
        assertNotNull(info);
        assertEquals(SERVICE_1, info.getServiceName());
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

        URL wsdl1 = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl1);
       
        ServiceImpl service = new ServiceImpl(getBus(), wsdl1, SERVICE_1, ServiceImpl.class);

        CalculatorPortType cal = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
       
        BindingProvider bindingProvider = (BindingProvider)cal;
       
        assertTrue(bindingProvider.getBinding() instanceof SOAPBinding);
        SOAPBinding binding = (SOAPBinding)bindingProvider.getBinding();
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

        URL wsdl1 = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl1);
       
        ServiceImpl service = new ServiceImpl(getBus(), wsdl1, SERVICE_1, ServiceImpl.class);

        CalculatorPortType cal = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
       
        BindingProvider bindingProvider = (BindingProvider)cal;
       
        assertTrue(bindingProvider.getBinding() instanceof SOAPBinding);
        SOAPBinding binding = (SOAPBinding)bindingProvider.getBinding();
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

        URL wsdl1 = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl1);
       
        ServiceImpl service = new ServiceImpl(getBus(), wsdl1, SERVICE_1, ServiceImpl.class);

        CalculatorPortType cal = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
        assertNotNull(cal);
    }
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

        URL wsdl1 = getClass().getResource("/wsdl/calculator.wsdl");
        assertNotNull(wsdl1);
       
        ServiceImpl service = new ServiceImpl(getBus(), wsdl1, SERVICE_1, ServiceImpl.class);

        CalculatorPortType cal1 = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
        assertNotNull(cal1);
       
        ClientProxy cp = (ClientProxy)Proxy.getInvocationHandler(cal1);
        JAXBDataBinding db1 = (JAXBDataBinding) cp.getClient().getEndpoint().getService().getDataBinding();
        assertNotNull(db1);
       
        System.gc();
        System.gc();
        System.gc();
        System.gc();
       
        CalculatorPortType cal2 = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
        assertNotNull(cal2);

        cp = (ClientProxy)Proxy.getInvocationHandler(cal2);
        JAXBDataBinding db2 = (JAXBDataBinding) cp.getClient().getEndpoint().getService().getDataBinding();
        assertNotNull(db2);
View Full Code Here

Examples of org.apache.cxf.calculator.CalculatorPortType

        TestHandlerResolver resolver = new TestHandlerResolver();
        assertNull(resolver.getPortInfo());

        service.setHandlerResolver(resolver);
       
        CalculatorPortType cal = (CalculatorPortType)service.getPort(PORT_1, CalculatorPortType.class);
        assertNotNull(cal);

        PortInfo info = resolver.getPortInfo();
        assertNotNull(info);
        assertEquals(SERVICE_1, info.getServiceName());
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.