NutzCN Logo
问答 CXF插件的demo地址
发布于 132天前 作者 wendal 126 次浏览 复制 上一个帖子 下一个帖子
标签:

插件地址: https://github.com/nutzam/nutzmore/tree/master/nutz-integration-cxf
客户端测试代码:

    @Test
    public void test_local() throws MalformedURLException {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setServiceClass(EchoService.class);
        factory.setAddress("https://nutz.cn/cxf/EchoService");
        EchoService client = (EchoService) factory.create();
         
        String reply = client.echo("hi, cxf");
        System.out.println("Server said: " + reply);
        System.out.println("Server said: " + client.ping());
        assertEquals("hi, cxf", reply);
    }

0 回复
添加回复
请先登陆
回到顶部