1 Star 3 Fork 1

LiuXing / webservice

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

SpringBootWebservice

1. 引入除springboot外pom文件

Spring Boot 已经集成了 cxf 所需要其他的相关依赖

<!--cxf-->
<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
    <version>3.2.5</version>
</dependency>

##2. 接口

@WebService(name = "TFamilyService",  // 对外暴露的服务名称
        targetNamespace = "http://service.webservice.com")  // 命名空间,一般是接口的包名倒序
public interface TFamilyService {
    @WebMethod
    public String chairman(@WebParam(name = "reqXml") String reqXml);
}

##3. 实现类

@WebService(name = "TFamilyService",// 对外暴露的服务名称
        targetNamespace = "http://service.webservice.com",  // 命名空间,一般是接口的包名倒序
        endpointInterface = "com.webservice.service.TFamilyService") // 接口地址
@Component
public class TFamilyServiceImpl implements TFamilyService{
    @Override
    public String chairman(String reqXml) {
        return reqXml + ": 执行成功";
    }
}

##4. 配置类,发布服务 ##5. 测试

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/helloworld6379/webservice.git
git@gitee.com:helloworld6379/webservice.git
helloworld6379
webservice
webservice
master

搜索帮助