我知道 Webservice 可以通过使用注解 @Webservice 来创建,Wildfly 会自动创建它的实例。 但是我有配置文件,我在其中定义了 webservice url,我想使用这个 url 以编程方式创建 webservice。对于 spring 端点可以创建如下:
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint = new EndpointImpl(springBus(), new BaeldungImpl());
endpoint.publish("http://localhost:8080/services/baeldung");
return endpoint;
}
不幸的是,我的应用程序不使用 spring,而是使用 CDI。 有人可以建议我如何正确地做吗?
在此先感谢您的帮助。