Package org.apache.cxf.calculator

Examples of org.apache.cxf.calculator.CalculatorService


    public void testCalculator() 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();
        int ret = port.add(1, 2);
        assertEquals(ret, 3);
        try {
            port.add(1, -2);
            fail("should get exception since there is a negative arg");
View Full Code Here


    }
   
    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

        assertNotNull(service);

        // start external client
       
        assertNotNull(wsdl);
        CalculatorService service1 = new CalculatorService(wsdl, new QName(
                "http://apache.org/cxf/calculator", "CalculatorService"));
        CalculatorPortType port = service1.getCalculatorPort();
        int ret = port.add(1, 2);
        assertEquals(ret, 3);
        try {
            port.add(1, -2);
            fail("should get exception");
View Full Code Here

   
    private void calculatorTestBase() 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();
        ClientProxy.getClient(port).getInFaultInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
        int ret = port.add(1, 2);
        assertEquals(ret, 3);
        try {
View Full Code Here

    }
   
    private void multiClientTestBase() 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

        assertNotNull(service);

        // start external client
       
        assertNotNull(wsdl);
        CalculatorService service1 = new CalculatorService(wsdl, new QName(
                "http://apache.org/cxf/calculator", "CalculatorService"));
        CalculatorPortType port = service1.getCalculatorPort();
        int ret = port.add(1, 2);
        assertEquals(ret, 3);

    }
View Full Code Here

    }
   
    public void testProvider() 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();
        ClientProxy.getClient(port).getInFaultInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
       
        try {
            port.add(1, -2);
View Full Code Here

   
    private void calculatorTestBase() 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();
        ClientProxy.getClient(port).getInFaultInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(port).getInInterceptors().add(new LoggingInInterceptor());
        int ret = port.add(1, 2);
        assertEquals(ret, 3);
        try {
View Full Code Here

    }
   
    private void multiClientTestBase() 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

TOP

Related Classes of org.apache.cxf.calculator.CalculatorService

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.