小编Cri*_*isV的帖子

Spring Boot Soap Web服务(Java)-代码优先?

我想使用以下Soap Web服务创建Java中的SpringBoot应用程序:

@WebService
public class HelloWorld
{
    @WebMethod
    public String sayHello(String name)
    {
        return "Hello world, " + name;
    }
}
Run Code Online (Sandbox Code Playgroud)

我想获取WSDL ...我想必须创建端点或映射服务?我怎样才能做到这一点?

如果没有spring-boot,它会起作用,因为WEB-INF文件夹中的文件带有以下代码:

@WebService
public class HelloWorld
{
    @WebMethod
    public String sayHello(String name)
    {
        return "Hello world, " + name;
    }
}
Run Code Online (Sandbox Code Playgroud)

<endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime' version='2.0'>
    <endpoint name='HelloWorld' implementation='web.service.soap.HelloWorld' url-pattern='/HelloWorld'/>
</endpoints>
Run Code Online (Sandbox Code Playgroud)

java spring soap web-services spring-boot

5
推荐指数
1
解决办法
3321
查看次数

标签 统计

java ×1

soap ×1

spring ×1

spring-boot ×1

web-services ×1