Hi Alexander, I would say that the javax.xml.ws.spi.Provider being used is not the one in CXF but the JDK's one.
If you are working in a OSGi environment you should try to make sure the Thread Context Class Loader is set to the one of the bundle that provider CXF's Provider implementation, normally the one that carries the META-INF/service/javax.xml.ws.spi.Provider file. >From that point on I guess the only thing you need to do is to properly attach the corresponding Bus to the CXFNonSpringServlet. Hope this helps. Carlos. El 30/1/18 a las 10:33, Alexander Broekhuis escribió: > Hi all, > > I'm trying to get CXF to work with OSGi and the HTTP Service. While I can > get the bundles to run in my OSGi instance (Felix), I am not able to get my > own Endpoints registered. > > I created a custom servlet that extends the CXFNonSpringServlet. In this > servlet I create Endpoints using Endpoint.publish. > This is where I run into the problem that the default Java Endpoint > publisher is used, and not the CXF one. > > The following exception is thrown: > > "java.lang.IllegalArgumentException: Cannot create URL for this address > /TestResource > > at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish( > EndpointImpl.java:222)" > > What is the right way to get the proper Endpoint publisher? >
