cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Isuru Suriarachchi <isur...@gmail.com>
Subject Do CXF services with JAX-WS handlers work in OSGi?
Date Thu, 29 Mar 2012 13:47:01 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message