4 import org.apache.ws.commons.schema.resolver.URIResolver;
5 import org.apache.ws.commons.schema.resolver.CollectionURIResolver;
7 import org.xml.sax.InputSource;
9 import java.io.InputStream;
25 if (this.baseURL != null)
26 return this.baseURL.toString();
34 public InputSource
resolveEntity(String targetNamespace,String schemaLocation,
36 URL newImportedURL = null;
39 URL parentLocationURL;
40 if (this.baseURL != null)
41 parentLocationURL = this.
baseURL;
43 parentLocationURL =
new URL(baseUri);
44 newImportedURL =
new URL(parentLocationURL,schemaLocation);
45 InputStream newInputStream = newImportedURL.openStream();
46 return new InputSource(newInputStream);
48 catch (Exception ex) {
CustomURIResolver(URL baseURL)
InputSource resolveEntity(String targetNamespace, String schemaLocation, String baseUri)
String getCollectionBaseURI()
void setCollectionBaseURI(String uri)