首页 > 其他 > 详细

jdk1.8无法使用cxf

时间:2018-07-04 00:38:55      阅读:668      评论:0      收藏:0      [点我收藏+]
package com.rg2.webservice.impl;

import javax.xml.ws.Endpoint;

import com.rg2.webservice.HelloWorld;

public class Server {

    public static void main(String[] args) {
        System.out.println("web service start");
        HelloWorld implementor = new HelloWorldImpl();
        String address = "http://localhost/helloWorld";
        Endpoint.publish(address, implementor);//jdk实现暴露webservice接口
        System.out.println("web service started");
    }

}
package com.rg2.webservice.impl;

import javax.jws.WebService;

import com.rg2.webservice.HelloWorld;

@WebService
public class HelloWorldImpl implements HelloWorld {

    @Override
    public String say(String str) {
        return "hello"+str;
    }

}
package com.rg2.webservice;

import javax.jws.WebService;

@WebService
public interface HelloWorld {

    public String say(String str);
}

 

jdk1.8无法使用cxf

原文:https://www.cnblogs.com/zhengyuanyuan/p/9261238.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!