WSDLDefinition resolved;
try {
resolved = read(null, uri, uri.toURL());
imp.setDefinition(resolved.getDefinition());
} catch (Exception e) {
throw new ContributionResolveException(e);
}
} else {
if (location.startsWith("/")) {
// This is a relative URI against a contribution
location = location.substring(1);
// TODO: Need to resolve it against the contribution
} else {
// This is a relative URI against the WSDL document
URI baseURI = URI.create(model.getDefinition().getDocumentBaseURI());
URI locationURI = baseURI.resolve(location);
WSDLDefinition resolved;
try {
resolved = read(null, locationURI, locationURI.toURL());
imp.setDefinition(resolved.getDefinition());
} catch (Exception e) {
throw new ContributionResolveException(e);
}
}
}
}
}