Hi Carlos,

2018-01-31 14:52 GMT+01:00 <[email protected]>:

> 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.
>

Makes sense, seemed to be the problem yes.


>
> 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.
>

I've now set the TCCL explicitly to the classloader of the CXF provider's
class, and that did indeed do the trick!


>
> From that point on I guess the only thing you need to do is to properly
> attach the corresponding Bus to the CXFNonSpringServlet.
>

I already had this one in place, with the needed extensions, so fixed the
classloader was the last thing to do!


>
> Hope this helps.
>

Definitely! Thanks for the pointers!


>
> 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?
> >
>
>


-- 
Met vriendelijke groet,

Alexander Broekhuis

Reply via email to