Java 在Wildfly/JBoss应用服务器上以编程方式创建Web服务
我知道可以使用annotation@Webservice创建Webservice,而Wildfly会自动创建它的实例。 但我有一个配置文件,我在其中定义了webservice url,我想用这个url以编程方式创建webservice。对于spring,可以按如下方式创建端点:Java 在Wildfly/JBoss应用服务器上以编程方式创建Web服务,java,wildfly,programmatically,Java,Wildfly,Programmatically,我知道可以使用annotation@Webservice创建Webservice,而Wildfly会自动创建它的实例。 但我有一个配置文件,我在其中定义了webservice url,我想用这个url以编程方式创建webservice。对于spring,可以按如下方式创建端点: @Bean public Endpoint endpoint() { EndpointImpl endpoint = new EndpointImpl(springBus(), new BaeldungImpl
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint = new EndpointImpl(springBus(), new BaeldungImpl());
endpoint.publish("http://localhost:8080/services/baeldung");
return endpoint;
}
不幸的是,我的应用程序没有使用spring,而是使用CDI。
有人能建议我怎样才能正确地做吗
提前感谢您的帮助。您为什么要这样做?您试图做什么是普通批注方法不支持的?为什么要这样做?您试图做什么是普通注释方法不支持的?