static String mapSchemaLocation(String target, String base, OASISCatalogManager catalog) { try { String resolvedLocation = new OASISCatalogManagerHelper().resolve(catalog, target, base); if (resolvedLocation != null) { return resolvedLocation; } } catch (Exception ex) { //ignore } try { URIResolver resolver = new URIResolver(base, target); if (resolver.isResolved()) { target = resolver.getURI().toString(); } } catch (Exception ex) { //ignore } return target; } private Element removeImportElement(Element element,
static String mapSchemaLocation(String target, String base, OASISCatalogManager catalog) { try { String resolvedLocation = new OASISCatalogManagerHelper().resolve(catalog, target, base); if (resolvedLocation != null) { return resolvedLocation; } } catch (Exception ex) { //ignore } try { URIResolver resolver = new URIResolver(base, target); if (resolver.isResolved()) { target = resolver.getURI().toString(); } } catch (Exception ex) { //ignore } return target; } private Element removeImportElement(Element element,
private static String mapSchemaLocation(String target, String base, OASISCatalogManager catalog) { try { String resolvedLocation = new OASISCatalogManagerHelper().resolve(catalog, target, base); if (resolvedLocation != null) { return resolvedLocation; } } catch (Exception ex) { //ignore } try { URIResolver resolver = new URIResolver(base, target); if (resolver.isResolved()) { target = resolver.getURI().toString(); } } catch (Exception ex) { //ignore } return target; }
private static String mapSchemaLocation(String target, String base, OASISCatalogManager catalog) { try { String resolvedLocation = new OASISCatalogManagerHelper().resolve(catalog, target, base); if (resolvedLocation != null) { return resolvedLocation; } } catch (Exception ex) { //ignore } try { URIResolver resolver = new URIResolver(base, target); if (resolver.isResolved()) { target = resolver.getURI().toString(); } } catch (Exception ex) { //ignore } return target; }
private URL composeUrl(String s) { try { URIResolver resolver = new URIResolver(null, s, getClass()); if (resolver.isResolved()) { return resolver.getURI().toURL(); } throw new ServiceConstructionException(new Message("COULD_NOT_RESOLVE_URL", LOG, s)); } catch (IOException e) { throw new ServiceConstructionException(new Message("COULD_NOT_RESOLVE_URL", LOG, s), e); } }
private URL composeUrl(String s) { try { URIResolver resolver = new URIResolver(null, s, getClass()); if (resolver.isResolved()) { return resolver.getURI().toURL(); } throw new ServiceConstructionException(new Message("COULD_NOT_RESOLVE_URL", LOG, s)); } catch (IOException e) { throw new ServiceConstructionException(new Message("COULD_NOT_RESOLVE_URL", LOG, s), e); } }
try { URIResolver resolver = new URIResolver(bindingFile); xmlReader = StaxUtils.createXMLStreamReader(resolver.getURI().toString(), resolver.getInputStream()); root = StaxUtils.read(xmlReader, true).getDocumentElement();