public WSDLRefValidator(final String wsdl, final Document doc) {
this(wsdl, doc, BusFactory.getDefaultBus());
}
public WSDLRefValidator(final String wsdl, final Document doc, final Bus b) {
WSDLDefinitionBuilder wsdlBuilder = new WSDLDefinitionBuilder(b);
try {
this.definition = wsdlBuilder.build(wsdl);
WSDLManager mgr = b.getExtension(WSDLManager.class);
mgr.removeDefinition(this.definition);
if (wsdlBuilder.getImportedDefinitions().size() > 0) {
importedDefinitions = new ArrayList<Definition>();
importedDefinitions.addAll(wsdlBuilder.getImportedDefinitions());
}
} catch (Exception e) {
if (e.getCause() instanceof WSDLException) {
throw new ToolException(e.getCause().getMessage());
}