if (customWSDLResolver != null) {
reader.setURIResolver(customWSDLResolver);
}
// This turns on WSDL validation which is set off by default.
reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
WSDLSource wsdlSource = reader.createWSDLSource();
wsdlSource.setSource(document.getDocumentElement());
String uri = getBaseUri();
if (uri != null && !"".equals(uri)) {
try {
wsdlSource.setBaseURI(new URI(uri));
} catch (URISyntaxException e) {
File f = new File(uri);
if(f.exists()) {
wsdlSource.setBaseURI(f.toURI());
} else {
log.error(e.toString(), e);
}
}
}