You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
877 B
Java

package com.manage.config;
import com.manage.interfaces.webservice.PowerWebService;
import com.manage.interfaces.webservice.impl.PowerWebServiceImpl;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.xml.ws.Endpoint;
@Configuration
public class WebServiceConfig {
@Bean(name = Bus.DEFAULT_BUS_ID)
public SpringBus springBus() {
return new SpringBus();
}
@Bean
public PowerWebService powerWebService() {
return new PowerWebServiceImpl();
}
@Bean
public Endpoint endpoint(){
EndpointImpl endpoint = new EndpointImpl(springBus(),powerWebService());
endpoint.publish("PowerWebService");
return endpoint;
}
}