-or (overwrite) option of WSDL2Code doesn't work for services.xml
-----------------------------------------------------------------
Key: AXIS2-3348
URL: https://issues.apache.org/jira/browse/AXIS2-3348
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Components: codegen
Affects Versions: 1.3
Reporter: Kent Tong
Priority: Minor
In FileWriter, the createOutFile() method will check if the output file exists
and if yes, it won't do anything:
public void createOutFile(String packageName, String fileName) throws
Exception {
outputFile =
org.apache.axis2.util.FileWriter.createClassFile(outputFileLocation,
packageName,
fileName,
getFileExtensionForLanguage(language));
//set the existing flag
if (this.isOverride) {
this.stream = new FileOutputStream(outputFile);
} else {
fileExists = outputFile.exists();
if (!fileExists) {
this.stream = new FileOutputStream(outputFile);
} else {
log.info(Messages.getMessage("fileExistsNoOverwrite",
outputFile.toString()));
}
}
}
However, in the ServiceXMLWriter subclass, it no longer checks the isOverride
option:
public class ServiceXMLWriter extends FileWriter {
public void createOutFile(String packageName, String fileName) throws
Exception {
outputFile =
org.apache.axis2.util.FileWriter.createClassFile(outputFileLocation,
packageName,
"services",
".xml");
//set the existing flag
fileExists = outputFile.exists();
if (!fileExists) {
this.stream = new FileOutputStream(outputFile);
}
}
}
This prevents the -or option from working on the services.xml file.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]