liusheng
2025-04-27 5673a45b1bbbe33f2837ba8d94ce601c5f3e41b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.ruoyi.web.webservice;
 
 
import com.ruoyi.web.webservice.impl.PateintBaseServiceImpl;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
import javax.xml.ws.Endpoint;
 
@Configuration
public class PstientWSConfig {
    @Bean
    public ServletRegistrationBean disServlet() {
 
 
        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new CXFServlet(), "/API_ESB_Service");
        return servletRegistrationBean;
    }
 
    @Bean(name = Bus.DEFAULT_BUS_ID)
    public SpringBus springBus() {
 
 
        return new SpringBus();
    }
    @Bean
    public Endpoint endpoint() {
 
 
        EndpointImpl endpoint = new EndpointImpl(springBus(),new PateintBaseServiceImpl());
        endpoint.publish("");
        return endpoint;
    }
}