import org.junit.Test;
public class CatalogTest extends Assert {
@Test
public void testCatalog() throws Exception {
OASISCatalogManager catalogManager = new OASISCatalogManager();
URL jaxwscatalog = getClass().getResource("/META-INF/jax-ws-catalog.xml");
assertNotNull(jaxwscatalog);
catalogManager.loadCatalog(jaxwscatalog);
String xsd = "http://www.w3.org/2005/08/addressing/ws-addr.xsd";
String resolvedSchemaLocation = catalogManager.resolveSystem(xsd);
assertEquals("classpath:/schemas/wsdl/ws-addr.xsd", resolvedSchemaLocation);
ExtendedURIResolver resolver = new ExtendedURIResolver();
InputSource in = resolver.resolve(resolvedSchemaLocation, null);
assertTrue(in.getSystemId().indexOf("api") != -1);