log.info("Generating code for WSDL at " + wsdlUri + " with a base URI of " + baseURI);
InputSource source = new InputSource(resolver.getInputStream());
source.setSystemId(wsdlUri);
WSDLServiceBuilder builder = new WSDLServiceBuilder(baseURI, source);
builder.setBindingProvider(support.getBindingProvider());
builder.setForceBare(forceBare);
builder.build();
if (profile == null) profile = Jsr181Profile.class.getName();
PluginProfile profileObj =
(PluginProfile) ClassLoaderUtils.loadClass(profile, getClass()).newInstance();
GenerationContext context = new GenerationContext(codeModel, builder.getDefinition());
context.setOutputDirectory(dest);
context.setWsdlLocation(wsdlUri);
context.setBaseURI(baseURI);
context.setSchemas(builder.getSchemas());
context.setExternalBindings(getExternalBindingFiles());
context.setExplicitAnnotation(isExplicitAnnotation());
context.setServerStubOverwritten(isOverwrite());
context.setDescriptorOverwritten(isOverwrite());
context.setServerStubGenerated(isGenerateServerStubs());
if (binding.equals(JAXB) && jaxbErrorListener != null)
{
((JAXBSchemaSupport)support).setErrorListener(jaxbErrorListener);
}
support.initialize(context);
// The schema generator may replace our code model.
this.codeModel = context.getCodeModel();
context.setServices(builder.getServices());
context.setDestinationPackage(getDestinationPackage());
context.setSchemaGenerator(support);
for (Iterator<GeneratorPlugin> pitr = profileObj.getPlugins().iterator(); pitr.hasNext();)
{