I got it to work!
In the end it was pleasantly simple. I extend
org.apache.cxf.transport.servlet.CXFNonSpringServlet and register my
servlet on the OSGi HTTP Whiteboard.
@Component(
immediate = true,
scope = ServiceScope.SINGLETON,
service = Servlet.class,
property = { HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN +
"=/MyService" })
public class MyServiceServlet extends CXFNonSpringServlet {
@Reference
private MyService impl;
@Override
public void init(ServletConfig sc) throws ServletException {
super.init(sc);
final JaxWsServerFactoryBean svrFactory = new
JaxWsServerFactoryBean();
svrFactory.setServiceBean(impl);
svrFactory.create();
}
}
This should probably be added to the How-To
<http://cxf.apache.org/docs/how-tos.html> section of the CXF User's Guide.
On 09.04.19 15:45, Christian Schneider wrote:
You could look into the multi bundle distro of cxf-dosgi as a starting
point.
https://github.com/apache/cxf-dosgi/tree/master/distribution/multi-bundle
Christian
Am Mo., 8. Apr. 2019 um 14:12 Uhr schrieb Frank Rosenberger <
[email protected]>:
Hi,
I would like to use CXF to provide JAX-WS (SOAP) WebServices in a plain
OSGi environment on Apache Felix.
All CXF documentation I found talks about setup on Karaf, using
Blueprint or even Spring ...
How could I publish an Endpoint that binds to a Servlet registered (via
DS annotations) on the OSGi HTTP Whiteboard?
Regards,
Frank Rosenberger
__________ Information from ESET Mail Security, version of virus signature
database 19159 (20190408) __________
The message was checked by ESET Mail Security.
http://www.eset.com
__________ Information from ESET Mail Security, version of virus signature
database 19183 (20190412) __________
The message was checked by ESET Mail Security.
http://www.eset.com