流程:
1.新建一个java工程
2.建立WebService接口
3.接口的实现类
4.java客户端调用
5.C#端调用
下面开始:
所需的资料:
apache-cxf-2.7.5 下载链接 http://download.youkuaiyun.com/detail/surehao/7005281
找相应的jar,导入项目
建立WebService接口:
import javax.jws.WebService;
@WebService
public interface ServiceInterface {
public String hi(String hi);
}
接口的实现类:
package com.cxf.server;
package com.cxf.server;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;
@WebService(endpointInterface="com.cxf.server.ServiceInterface",serviceName="hiService")
public class Server implements ServiceInterface {
@Override
public String hi(String hi) {
return hi+"你好";
}
/**