You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2007/12/28 13:47:43 UTC
[jira] Resolved: (AXIS2-3348) -or (overwrite) option of WSDL2Code
doesn't work for services.xml
[ https://issues.apache.org/jira/browse/AXIS2-3348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amila Chinthaka Suriarachchi resolved AXIS2-3348.
-------------------------------------------------
Resolution: Fixed
Assignee: Amila Chinthaka Suriarachchi
fixed the issue
> -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
> Assignee: Amila Chinthaka Suriarachchi
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org