*/
public Wsdl2Java(File wsdlFile, File descriptorFile, boolean overwrite, boolean generateCustomHeaders, File targetDirectory) throws Exception {
Document descriptorDocument = getDescriptorDocument(descriptorFile);
Document[] wsdlDocuments = null;
MetadataDescriptor[] metadataDescriptors = null;
WsdlEnvironment env = null;
//
// They can't both be null, otherwise what are we generating?
//
if(wsdlFile == null && descriptorFile == null) {
handleErrorAndExit(_MESSAGES.get("NullWSDLBuiltinDescriptor"));
}
//
// If we got a wsdlFile passed in then we are going to generate based off the wsdlFile
// and use data in the deployment descriptor (if any is avaialable) as supplemental.
// If the wsdlFie is null then we are generating from the deployment descriptor and
// we need to load all of the wsdl files it contains.
//
if(wsdlFile != null) {
env = new WsdlEnvironment(wsdlFile.getAbsoluteFile().getParentFile());
wsdlDocuments = new Document[] { getWSDLDocument(wsdlFile.getName(), env) };
metadataDescriptors = new MetadataDescriptor[] { getMetadataDescriptor(wsdlFile.getName(), env, wsdlDocuments[0]) };
} else {
env = new WsdlEnvironment(descriptorFile.getAbsoluteFile().getParentFile());
wsdlDocuments = getWSDLDocuments(descriptorFile, descriptorDocument);
metadataDescriptors = getMetadataDescriptors(descriptorFile, descriptorDocument);
}
_configuration = new ConfigurationData();