{
StandaloneContainer.setConfigurationPath(Thread.currentThread().getContextClassLoader().getResource(
"conf/standalone/test-configuration.xml").getPath());
StandaloneContainer container = StandaloneContainer.getInstance();
XMLResolvingService resolvingService =
(XMLResolvingService)container.getComponentInstanceOfType(XMLResolvingService.class);
assertNotNull("XMLResolvingService", resolvingService);
XMLReader xmlReader = XMLReaderFactory.createXMLReader();
xmlReader.setEntityResolver(resolvingService.getEntityResolver());
assertNotNull("resolvingService.getEntityResolver()", resolvingService.getEntityResolver());
log.info("resolvingService class is " + resolvingService.getClass().getName());
InputSource src =
resolvingService.getEntityResolver().resolveEntity("-//W3C//DTD XHTML 1.0 Transitional//EN",
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd");
log.info(src.getSystemId());
assertNotNull("Not resolved InputSource entity", src);