use of org.apache.cxf.transport.servlet.ServletContextResourceResolver in project BIMserver by opensourceBIM.
the class GenericWebServiceServlet method init.
public void init(ServletConfig sc) throws ServletException {
// Setting this property because otherwise a file named
// "wsdl.properties" will be read from the JRE, which is not possible
// due to restrictive permissions
System.setProperty("javax.wsdl.factory.WSDLFactory", "com.ibm.wsdl.factory.WSDLFactoryImpl");
if (this.bus == null) {
loadBus(sc);
}
loader = bus.getExtension(ClassLoader.class);
ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
resourceManager.addResourceResolver(new ServletContextResourceResolver(sc.getServletContext()));
if (destinationRegistry == null) {
this.destinationRegistry = getDestinationRegistryFromBus(this.bus);
}
this.controller = createServletController(sc);
redirectList = parseListSequence(sc.getInitParameter(REDIRECTS_PARAMETER));
redirectQueryCheck = Boolean.valueOf(sc.getInitParameter(REDIRECT_QUERY_CHECK_PARAMETER));
dispatcherServletName = sc.getInitParameter(REDIRECT_SERVLET_NAME_PARAMETER);
dispatcherServletPath = sc.getInitParameter(REDIRECT_SERVLET_PATH_PARAMETER);
}
use of org.apache.cxf.transport.servlet.ServletContextResourceResolver in project jbossws-cxf by jbossws.
the class CXFServletExt method updateAvailableBusWithServletInfo.
private void updateAvailableBusWithServletInfo(ServletConfig servletConfig) {
BusHolder holder = endpoint.getService().getDeployment().getAttachment(BusHolder.class);
// set the bus from deployment into the CXF servlet and assign it to the current thread (do not touch the default bus!)
bus = holder.getBus();
BusFactory.setThreadDefaultBus(bus);
// update the resource manager adding the ServletContextResourceResolver that was to be added by CXF servlet
ResourceManager resourceManager = bus.getExtension(ResourceManager.class);
resourceManager.addResourceResolver(new ServletContextResourceResolver(servletConfig.getServletContext()));
}
Aggregations