diff --git a/src/etc/testcases/taskdefs/optional/WsdlToDotnet.xml b/src/etc/testcases/taskdefs/optional/WsdlToDotnet.xml index ff3d5405c..47e2561d5 100644 --- a/src/etc/testcases/taskdefs/optional/WsdlToDotnet.xml +++ b/src/etc/testcases/taskdefs/optional/WsdlToDotnet.xml @@ -40,6 +40,7 @@ wsdl.found=${wsdl.found} + @@ -57,7 +58,6 @@ - @@ -142,7 +142,7 @@ - + + depends="init" if="vbc.found"> No app created - + Defaults to false on Windows and true on any other platform.

+ * + * @since Ant 1.7 + */ + public void setMono(boolean b) { + isMono = b; + } + /** * validation code * @throws BuildException if validation failed @@ -170,15 +193,16 @@ public class WsdlToDotnet extends Task { throw new BuildException( "destination file is a directory"); } - if (url != null && srcFile != null) { + if (url != null && srcFileName != null) { throw new BuildException( "you can not specify both a source file and a URL"); } - if (url == null && srcFile == null) { + if (url == null && srcFileName == null) { throw new BuildException( "you must specify either a source file or a URL"); } - if (srcFile != null) { + if (srcFileName != null) { + File srcFile = getProject().resolveFile(srcFileName); if (!srcFile.exists()) { throw new BuildException( "source file does not exist"); @@ -213,8 +237,14 @@ public class WsdlToDotnet extends Task { //set source and rebuild options boolean rebuild = true; - if (srcFile != null) { - command.addArgument(srcFile.toString()); + if (srcFileName != null) { + File srcFile = getProject().resolveFile(srcFileName); + if (isMono) { + // Mono 1.0's wsdl doesn't deal with absolute paths + command.addArgument(srcFileName); + } else { + command.addArgument(srcFile.toString()); + } //rebuild unless the dest file is newer than the source file if (srcFile.exists() && destFile.exists() && srcFile.lastModified() <= destFile.lastModified()) {