protected Definition parse( InputSource source ) throws Exception {
WSDLReader wsdlReader = javax.wsdl.factory.WSDLFactory.newInstance().newWSDLReader();
wsdlReader.setFeature(Constants.FEATURE_VERBOSE, false);
wsdlReader.setFeature(Constants.FEATURE_IMPORT_DOCUMENTS, false);
// We use a custom WSDLLocator that never tries to resolve the import locations for WSDLs or XSDs.
WSDLLocator locator = new CustomWSDLLocator(source, baseUri);
return wsdlReader.readWSDL(locator);
}