JBoss Community

jbossws-native: Publish HttpContext via Endpoint API

created by Pedro Correia in JBoss Web Services - View the full discussion

Hello all,

 

I'm using jboss-5.1.0.GA and currently upgraded jbossws-native to version 3.4.1.GA.

 

Previously (as in jbossws-native 3.1.2.GA) I was able to publish a Web Service programmatically (via Endpoint) to the container's HTTP server.

One could either use the static Endpoint.publish or get hold of the running HTTP server/context, eg:

 

Endpoint endpoint = Endpoint.create(implementor);

SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();

HttpServer httpServer = spiProvider.getSPI(HttpServerFactory.class).getHttpServer();

HttpContext context = httpServer.createContext(path);

endpoint.publish(context);

 

However, as I understand it after refactoring jbossws-native, the default HTTP server for endpoint publishing is now Netty, as opposed to the container's Apache Tomcat. This refactoring is also evident in the code as HttpServerFactory has been removed from the library!

 

My question is: How can I maintain the previous behavior, i.e. acquire the container's HTTP Server and publish the webservice on it?

Is there an alternative to get the JEE HTTP Server? Or was this really broken on purpose to avoid programmatic deployment on the JEE server?

 

Thanks in advance.

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community