Hi Dan, I currently manually add the CXFNonSpring(JaxRs)Servlet to Jetty ServletContextHandlers and these to the Server instance of Jetty. In my application I have:
1. a number of SOAP-based web services 2. a number of JAX-RS-based web services 3. servlets & JSP, and 4. Websockets Another requirement of my application is that it needs to be possible to start and stop individual services, servlets and websocket servlets at runtime (which I am currently doing by adding/removing ServletContextHandler instances to a ContextHandlerCollection). So currently I have an individual context for every service/servlet/websocket and this works more or less fine. Now here comes the actual problem: I wanted to use Apache Shiro as security framework. In the ideal configuration Shiro would run as a filter in the chain "in front of" all my services. But as my services are in individual contexts I would have to add the Shiro filter to each individual context, resulting in one configuration file for Shiro per context (which is suboptimal, especially as all URLs in the configuration files would be relative, making it very unintuitive). Therefore I would like to only have one context (the root context) and add each service as a Servlet to the root context. This works fine for JAX-RS using CXFNonSpringJaxrsServlet and for Servlets, JSPs and Websockets. But for JAX-WS web services I couldn't find a similar way. I will have a look into the ServerFactoryBeans as you suggest. But from what I can see from a first glance at the inheritance hierarchy there seems only to be classes for publishing JAX-RS and JAX-WS services but not for publishing any other Servlets. Or am I mistaken here? Best regards Daniel On 24.09.2013, at 18:34, Daniel Kulp wrote: > > On Sep 24, 2013, at 5:48 AM, Daniel Bimschas <[email protected]> > wrote: > >> Dear CXF gods! >> >> Is there a way to add a SOAP endpoint without calling Endpoint.publish(...)? >> I'm using an embedded Jetty and need fine grained control over the way >> ContextHandlers and Servlets are added to it and Endpoint.publish() does >> some "magic" that I would like to avoid. > > You can use the JaxWsServerFactoryBean to create the server object and then > start it. Not sure what the "Magic" is that you are trying to avoid so > that may or may not work. > > Dan > > >> >> Best regards >> Daniel >> >> >> -- >> Daniel Bimschas, M.Sc. >> >> >> UNIVERSITÄT ZU LÜBECK >> INSTITUT FÜR TELEMATIK >> >> Ratzeburger Allee 160 >> 23538 Lübeck >> >> Tel +49 451 500 5392 >> Fax +49 451 500 5382 >> [email protected] >> >> https://www.itm.uni-luebeck.de/people/bimschas >> > > -- > Daniel Kulp > [email protected] - http://dankulp.com/blog > Talend Community Coder - http://coders.talend.com > -- Daniel Bimschas, M.Sc. UNIVERSITÄT ZU LÜBECK INSTITUT FÜR TELEMATIK Ratzeburger Allee 160 23538 Lübeck Tel +49 451 500 5392 Fax +49 451 500 5382 [email protected] https://www.itm.uni-luebeck.de/people/bimschas
