I’am in a project spring boot with web service soap
when i run my application i have this error
APPLICATION FAILED TO START
Description:
Parameter 0 of method getInfo in org.endpoint.EndpointConfig required a bean of type ‘org.apache.cxf.Bus’ that could not be found.
Action:
Consider defining a bean of type ‘org.apache.cxf.Bus’ in your configuration.
<code>import org.service.MyService;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class EndpointConfig {
@Bean
public EndpointImpl getInfo(Bus bus, MyService service) {
EndpointImpl endpoint = new EndpointImpl(bus, service);
endpoint.publish("/info");
return endpoint;
}
}
@SpringBootApplication()
public class APIApplication{
public static void main(String[] args) {
new SpringApplicationBuilder(APIApplication.class).run(args);
}
}
</code>
<code>import org.service.MyService;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class EndpointConfig {
@Bean
public EndpointImpl getInfo(Bus bus, MyService service) {
EndpointImpl endpoint = new EndpointImpl(bus, service);
endpoint.publish("/info");
return endpoint;
}
}
@SpringBootApplication()
public class APIApplication{
public static void main(String[] args) {
new SpringApplicationBuilder(APIApplication.class).run(args);
}
}
</code>
import org.service.MyService;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class EndpointConfig {
@Bean
public EndpointImpl getInfo(Bus bus, MyService service) {
EndpointImpl endpoint = new EndpointImpl(bus, service);
endpoint.publish("/info");
return endpoint;
}
}
@SpringBootApplication()
public class APIApplication{
public static void main(String[] args) {
new SpringApplicationBuilder(APIApplication.class).run(args);
}
}