Examples of HelloInterface


Examples of org.apache.cxf.jaxws.service.HelloInterface

       
        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");
       
        HelloInterface proxy = service.getPort(portName, HelloInterface.class, new LoggingFeature());
        Client client = ClientProxy.getClient(proxy);
        boolean found = false;
        for (Interceptor<? extends Message> i : client.getOutInterceptors()) {
            if (i instanceof LoggingOutInterceptor) {
                found = true;
            }
        }
        assertTrue(found);
        assertEquals("Get the wrong result", "hello", proxy.sayHi("hello"));
        String[] strInput = new String[2];
        strInput[0] = "Hello";
        strInput[1] = "Bonjour";
        String[] strings = proxy.getStringArray(strInput);
        assertEquals(strings.length, 2);
        assertEquals(strings[0], "HelloHello");
        assertEquals(strings[1], "BonjourBonjour");
        List<String> listInput = new ArrayList<String>();
        listInput.add("Hello");
        listInput.add("Bonjour");
        List<String> list = proxy.getStringList(listInput);
        assertEquals(list.size(), 2);
        assertEquals(list.get(0), "HelloHello");
        assertEquals(list.get(1), "BonjourBonjour");
        //now the client side can't unmarshal the complex type without binding types annoutation
        List<String> result = proxy.getGreetings();
        assertEquals(2, result.size());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.HelloInterface

        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");

        HelloInterface proxy = service.getPort(portName, HelloInterface.class);
        ClientProxy.getClient(proxy).getInFaultInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(proxy).getInInterceptors().add(new LoggingInInterceptor());
        try {  
            proxy.addNumbers(1, -2);
            fail("should throw AddNumbersException");
        } catch (AddNumbersException e) {
            assertEquals(e.getInfo(), "Sum is less than 0.");
        }
       
        try {  
            proxy.addNumbers(1, 99);
            fail("should throw AddNumbersSubException");
        } catch (AddNumbersSubException e) {
            assertEquals(e.getSubInfo(), "Sum is 100");
        } catch (AddNumbersException e) {
            fail("should throw AddNumbersSubException");
View Full Code Here

Examples of org.apache.cxf.jaxws.service.HelloInterface

       
        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");
       
        HelloInterface proxy = service.getPort(portName, HelloInterface.class);
        assertEquals("Get the wrong result", "hello", proxy.sayHi("hello"));
        String[] strInput = new String[2];
        strInput[0] = "Hello";
        strInput[1] = "Bonjour";
        String[] strings = proxy.getStringArray(strInput);
        assertEquals(strings.length, 2);
        assertEquals(strings[0], "HelloHello");
        assertEquals(strings[1], "BonjourBonjour");
        List<String> listInput = new ArrayList<String>();
        listInput.add("Hello");
        listInput.add("Bonjour");
        List<String> list = proxy.getStringList(listInput);
        assertEquals(list.size(), 2);
        assertEquals(list.get(0), "HelloHello");
        assertEquals(list.get(1), "BonjourBonjour");
        //now the client side can't unmarshal the complex type without binding types annoutation
        List<String> result = proxy.getGreetings();
        assertEquals(2, result.size());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.HelloInterface

       
        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");
       
        HelloInterface proxy = service.getPort(portName, HelloInterface.class);
        assertEquals("Get the wrong result", "hello", proxy.sayHi("hello"));
        String[] strInput = new String[2];
        strInput[0] = "Hello";
        strInput[1] = "Bonjour";
        String[] strings = proxy.getStringArray(strInput);
        assertEquals(strings.length, 2);
        assertEquals(strings[0], "HelloHello");
        assertEquals(strings[1], "BonjourBonjour");
        List<String> listInput = new ArrayList<String>();
        listInput.add("Hello");
        listInput.add("Bonjour");
        List<String> list = proxy.getStringList(listInput);
        assertEquals(list.size(), 2);
        assertEquals(list.get(0), "HelloHello");
        assertEquals(list.get(1), "BonjourBonjour");
        //now the client side can't unmarshal the complex type without binding types annoutation
        List<String> result = proxy.getGreetings();
        assertEquals(2, result.size());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.HelloInterface

       
        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");
       
        HelloInterface proxy = service.getPort(portName, HelloInterface.class);
        assertEquals("Get the wrong result", "hello", proxy.sayHi("hello"));
        String[] strInput = new String[2];
        strInput[0] = "Hello";
        strInput[1] = "Bonjour";
        String[] strings = proxy.getStringArray(strInput);
        assertEquals(strings.length, 2);
        assertEquals(strings[0], "HelloHello");
        assertEquals(strings[1], "BonjourBonjour");
        List<String> listInput = new ArrayList<String>();
        listInput.add("Hello");
        listInput.add("Bonjour");
        List<String> list = proxy.getStringList(listInput);
        assertEquals(list.size(), 2);
        assertEquals(list.get(0), "HelloHello");
        assertEquals(list.get(1), "BonjourBonjour");
        //now the client side can't unmarshal the complex type without binding types annoutation
        List<String> result = proxy.getGreetings();
        assertEquals(2, result.size());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.HelloInterface

        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");

        HelloInterface proxy = service.getPort(portName, HelloInterface.class);
        ClientProxy.getClient(proxy).getInFaultInterceptors().add(new LoggingInInterceptor());
        ClientProxy.getClient(proxy).getInInterceptors().add(new LoggingInInterceptor());
        try {  
            proxy.addNumbers(1, -2);
            fail("should throw AddNumbersException");
        } catch (AddNumbersException e) {
            assertEquals(e.getInfo(), "Sum is less than 0.");
        }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.HelloInterface

       
        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");
       
        HelloInterface proxy = service.getPort(portName, HelloInterface.class);
        assertEquals("Get the wrong result", "hello", proxy.sayHi("hello"));
        String[] strInput = new String[2];
        strInput[0] = "Hello";
        strInput[1] = "Bonjour";
        String[] strings = proxy.getStringArray(strInput);
        assertEquals(strings.length, 2);
        assertEquals(strings[0], "HelloHello");
        assertEquals(strings[1], "BonjourBonjour");
        List<String> listInput = new ArrayList<String>();
        listInput.add("Hello");
        listInput.add("Bonjour");
        List<String> list = proxy.getStringList(listInput);
        assertEquals(list.size(), 2);
        assertEquals(list.get(0), "HelloHello");
        assertEquals(list.get(1), "BonjourBonjour");
        //now the client side can't unmarshal the complex type without binding types annoutation
        List<String> result = proxy.getGreetings();
        assertEquals(2, result.size());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.HelloInterface

       
        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");
       
        HelloInterface proxy = service.getPort(portName, HelloInterface.class);
        assertEquals("Get the wrong result", "hello", proxy.sayHi("hello"));
        String[] strInput = new String[2];
        strInput[0] = "Hello";
        strInput[1] = "Bonjour";
        String[] strings = proxy.getStringArray(strInput);
        assertEquals(strings.length, 2);
        assertEquals(strings[0], "HelloHello");
        assertEquals(strings[1], "BonjourBonjour");
        List<String> listInput = new ArrayList<String>();
        listInput.add("Hello");
        listInput.add("Bonjour");
        List<String> list = proxy.getStringList(listInput);
        assertEquals(list.size(), 2);
        assertEquals(list.get(0), "HelloHello");
        assertEquals(list.get(1), "BonjourBonjour");
        //now the client side can't unmarshal the complex type without binding types annoutation
        List<String> result = proxy.getGreetings();
        assertEquals(2, result.size());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.service.HelloInterface

       
        // need to set the same bus with service , so use the ServiceImpl
        ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
        service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");
       
        HelloInterface proxy = service.getPort(portName, HelloInterface.class);
        assertEquals("Get the wrong result", "hello", proxy.sayHi("hello"));
        String[] strInput = new String[2];
        strInput[0] = "Hello";
        strInput[1] = "Bonjour";
        String[] strings = proxy.getStringArray(strInput);
        assertEquals(strings.length, 2);
        assertEquals(strings[0], "HelloHello");
        assertEquals(strings[1], "BonjourBonjour");
        List<String> listInput = new ArrayList<String>();
        listInput.add("Hello");
        listInput.add("Bonjour");
        List<String> list = proxy.getStringList(listInput);
        assertEquals(list.size(), 2);
        assertEquals(list.get(0), "HelloHello");
        assertEquals(list.get(1), "BonjourBonjour");
        //now the client side can't unmarshal the complex type without binding types annoutation
        List<String> result = proxy.getGreetings();
        assertEquals(2, result.size());
    }
View Full Code Here

Examples of org.ow2.easybeans.mavenplugin.examples.helloworld.HelloInterface

        try {
            System.out.println("Testing unbound project with Maven EasyBeans Plugin...");
            Context initialContext = getInitialContext();
            StatefulCalcRemote calc = getCalcEJB(initialContext);
            HelloInterface hr = getHelloEJB(initialContext);

            System.out.println("Calling Calculator methods : x = " + INITIAL_CALC_VALUE + " + " + VALUE_TEST_ADD);
            calc.initial(INITIAL_CALC_VALUE);
            calc.add(VALUE_TEST_ADD);
            Integer x = calc.result();

            System.out.println("Calling HelloWorld method : sayHello(x)");
            String result = hr.sayHello(x.toString());

            System.out.println("Result : " + result);

        } catch (Exception ex) {
            ex.printStackTrace();
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.