Bus bus = env.get(Bus.class);
if (bus == null) {
bus = BusFactory.getThreadDefaultBus();
env.put(Bus.class, bus);
}
WSDLDefinitionBuilder builder = new WSDLDefinitionBuilder(bus);
wsdlDefinition = builder.build(wsdlURL);
if (env.fullValidateWSDL()) {
validate(wsdlDefinition, env, bus);
}
WSDLManager mgr = bus.getExtension(WSDLManager.class);
mgr.removeDefinition(wsdlDefinition);
wsdlFactory = mgr.getWSDLFactory();
extReg = mgr.getExtensionRegistry();
wsdlPlugins = builder.getWSDLPlugins();
}