package org.jeecg.modules.mdc.config;
|
|
import org.apache.cxf.Bus;
|
import org.apache.cxf.bus.spring.SpringBus;
|
import org.apache.cxf.jaxws.EndpointImpl;
|
import org.jeecg.modules.mdc.webservice.EquipmentWebService;
|
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Configuration;
|
|
import javax.xml.ws.Endpoint;
|
|
/**
|
* @Author hweiyu
|
* @Description
|
* @Date 2021/4/21 17:55
|
*/
|
@Configuration
|
public class WebServiceConfig {
|
|
/**
|
* Bus交由spring管理
|
* @return
|
*/
|
@Bean(name = Bus.DEFAULT_BUS_ID)
|
public SpringBus springBus() {
|
return new SpringBus();
|
}
|
|
|
/**
|
* 服务地址:
|
* http://localhost:9999/services
|
* http://localhost:9999/services/EquipmentWebService?wsdl
|
* @param equipmentWebService
|
* @return
|
*/
|
@Bean
|
public Endpoint endpoint(EquipmentWebService equipmentWebService) {
|
EndpointImpl endpoint = new EndpointImpl(springBus(), equipmentWebService);
|
endpoint.publish("/EquipmentWebService");
|
return endpoint;
|
}
|
}
|