I'm trying CXF in my OSGi container and looks like JAX-WS handler samples
are not working inside OSGi. When I had a look at the code in
the HandlerChainBuilder class, it uses clz.getResource(filename) to load
the handler file. This fails in OSGi.

protected URL resolveHandlerChainFile(Class clz, String filename) {
        URL handlerFile = clz.getResource(filename);
        if (handlerFile == null) {
            //the file location might be an absolute java.net.URL in
externalForm.
            try {
                handlerFile = new URL(filename);
                //test if the URL can be opened
                handlerFile.openStream();
            } catch (Exception e) {
                //do nothing
            }
        }
        return handlerFile;
    }

Has anyone tried this before? Is there a workaround for this problem?

Thanks,
~Isuru

Reply via email to