Package org.apache.cxf.jaxws

Examples of org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()


        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
        proxyFac.setAddress("local://StudentService");
        proxyFac.setBus(getBus());
        setupAegis(proxyFac.getClientFactoryBean());

        StudentService clientInterface = proxyFac.create(StudentService.class);
        Map<Long, Student> fullMap = clientInterface.getStudentsMap();
        assertNotNull(fullMap);
        Student one = fullMap.get(Long.valueOf(1));
        assertNotNull(one);
        assertEquals("Student1", one.getName());
View Full Code Here


        setupAegis(proxyFac.getClientFactoryBean());

        proxyFac.getInInterceptors().add(new LoggingInInterceptor());
        proxyFac.getOutInterceptors().add(new LoggingOutInterceptor());

        StudentServiceDocLiteral clientInterface = proxyFac.create(StudentServiceDocLiteral.class);
        Map<Long, Student> fullMap = clientInterface.getStudentsMap();
        assertNotNull(fullMap);
        Student one = fullMap.get(Long.valueOf(1));
        assertNotNull(one);
        assertEquals("Student1", one.getName());
View Full Code Here

    public void testHelloService() throws Exception {
        JaxWsProxyFactoryBean cpfb = new JaxWsProxyFactoryBean();
        String address = serviceURL + "Hello";
        cpfb.setServiceClass(Hello.class);
        cpfb.setAddress(address);
        Hello hello = (Hello) cpfb.create();
        String reply = hello.sayHi(" Willem");
        assertEquals("Get the wrongreply ", reply, "get Willem");
    }

    @Test
View Full Code Here

        AegisDatabinding aegisBinding = new AegisDatabinding();
        JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
        proxyFactory.setDataBinding(aegisBinding);
        proxyFactory.setServiceClass(AuthService.class);
        proxyFactory.setAddress("http://localhost:" + PORT + "/jaxwsAndAegis");
        AuthService service = (AuthService) proxyFactory.create();
        assertTrue(service.authenticate("Joe", "Joe", "123"));
        assertFalse(service.authenticate("Joe1", "Joe", "fang"));     
        assertTrue(service.authenticate("Joe", null, "123"));
        List<String> list = service.getRoles("Joe");
        assertEquals(3, list.size());
View Full Code Here

        proxyFactory.setDataBinding(aegisBinding);
        proxyFactory.setServiceClass(SportsService.class);
        proxyFactory.setWsdlLocation("http://localhost:" + PORT + "/jaxwsAndAegisSports?wsdl");
        proxyFactory.getInInterceptors().add(new LoggingInInterceptor());
        proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor());
        SportsService service = (SportsService) proxyFactory.create();

        Collection<Team> teams = service.getTeams();
        assertEquals(1, teams.size());
        assertEquals("Patriots", teams.iterator().next().getName());
       
View Full Code Here

        proxyFactory.setDataBinding(aegisBinding);
        proxyFactory.setServiceClass(SportsService.class);
        proxyFactory.setAddress("http://localhost:" + PORT + "/jaxwsAndAegisSports");
        proxyFactory.getInInterceptors().add(new LoggingInInterceptor());
        proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor());
        SportsService service = (SportsService) proxyFactory.create();
        Map<String, Map<Integer, Integer>> result = service.testComplexMapResult();
        assertEquals(result.size(), 1);
        assertTrue(result.containsKey("key1"));
        assertNotNull(result.get("key1"));
        assertEquals(result.toString(), "{key1={1=3}}");
View Full Code Here

        proxyFactory.setDataBinding(aegisBinding);
        proxyFactory.setServiceClass(SportsService.class);
        proxyFactory.setAddress("http://localhost:" + PORT + "/jaxwsAndAegisSports");
        proxyFactory.getInInterceptors().add(new LoggingInInterceptor());
        proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor());
        SportsService service = (SportsService) proxyFactory.create();
        List<String> list = new ArrayList<String>();
        list.add("ffang");
        String ret = service.getGeneric(list);
        assertEquals(ret, "ffang");
    }
View Full Code Here

        proxyFactory.setDataBinding(aegisBinding);
        proxyFactory.setServiceClass(SportsService.class);
        proxyFactory.setAddress("http://localhost:" + PORT + "/jaxwsAndAegisSports");
        proxyFactory.getInInterceptors().add(new LoggingInInterceptor());
        proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor());
        SportsService service = (SportsService) proxyFactory.create();
        Pair<String, Integer> ret = service.getReturnGenericPair("ffang", 111);
        assertEquals("ffang", ret.getFirst());
        assertEquals(new Integer(111), ret.getSecond());
    }
   
View Full Code Here

        proxyFactory.setDataBinding(aegisBinding);
        proxyFactory.setServiceClass(SportsService.class);
        proxyFactory.setAddress("http://localhost:" + PORT + "/jaxwsAndAegisSports");
        proxyFactory.getInInterceptors().add(new LoggingInInterceptor());
        proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor());
        SportsService service = (SportsService) proxyFactory.create();
        Pair<Integer, String> ret = service.getReturnQualifiedPair(111, "ffang");
        assertEquals(new Integer(111), ret.getFirst());
        assertEquals("ffang", ret.getSecond());
    }
View Full Code Here

        proxyFactory.setDataBinding(aegisBinding);
        proxyFactory.setServiceClass(SportsService.class);
        proxyFactory.setAddress("http://localhost:" + PORT + "/jaxwsAndAegisSports");
        proxyFactory.getInInterceptors().add(new LoggingInInterceptor());
        proxyFactory.getOutInterceptors().add(new LoggingOutInterceptor());
        SportsService service = (SportsService) proxyFactory.create();
        int ret = service.getGenericPair(new Pair<Integer, String>(111, "String"));
        assertEquals(111, ret);
    }
   
    @Test
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.