-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hey All - I'm using NAnt and NAntContrib in a build tool that I've created, and came across a couple problems w/ the way the WsdlTask was generating the command line args for wsdl.exe; firstly, some of the arguments needed to be double-quoted, and weren't (eg a file path w/ spaces); second, the last argument (Path) was being appended without a space before it, making it run together with the previous argument.. The attached file is my patch to fix both these problems, although I'm not sure it's the best way to address the issue, and there may be other tasks (like DiscoTask) that have the same errors.
Thanks, Oliver Mellet pgp key at http://mellet.net/ogm.asc
-----BEGIN PGP SIGNATURE----- Version: PGP 8.0.3
iQA/AwUBQHs5WRw3re36lbviEQJfrACg8dQt1lq228EkXjMUVqIJ3PXGHjcAn0d3 VMbpkGLEJHowWfP9WVd3p2fX =NdSZ -----END PGP SIGNATURE-----
--- /dev/fs/D/oliver/../dl/WsdlTask.cs Mon Apr 12 17:39:17 2004 +++ /dev/fs/D/oliver/../NextGen/Utilities/NextGenBuild/WsdlTask.cs Mon Apr 12 17:40:07 2004 @@ -218,58 +218,58 @@ if (Language != null) { arguments.Append(" /l:"); - arguments.Append(Language); + arguments.Append(String.Format("\"{0}\"", Language)); } if (Namespace != null) { arguments.Append(" /n:"); - arguments.Append(Namespace); + arguments.Append(String.Format("\"{0}\"", Namespace)); } if (OutFile != null) { arguments.Append(" /o:"); - arguments.Append(OutFile); + arguments.Append(String.Format("\"{0}\"", OutFile)); } if (Protocol != null) { arguments.Append(" /protocol:"); - arguments.Append(Protocol); + arguments.Append(String.Format("\"{0}\"", Protocol)); } if (Username != null) { arguments.Append(" /username:"); - arguments.Append(Username); + arguments.Append(String.Format("\"{0}\"", Username)); } if (Password != null) { arguments.Append(" /password:"); - arguments.Append(Password); + arguments.Append(String.Format("\"{0}\"", Password)); } if (Domain != null) { arguments.Append(" /domain:"); - arguments.Append(Domain); + arguments.Append(String.Format("\"{0}\"", Domain)); } if (Proxy != null) { arguments.Append(" /proxy:"); - arguments.Append(Proxy); + arguments.Append(String.Format("\"{0}\"", Proxy)); } if (ProxyUsername != null) { arguments.Append(" /proxyusername:"); - arguments.Append(ProxyUsername); + arguments.Append(String.Format("\"{0}\"", ProxyUsername)); } if (ProxyPassword != null) { arguments.Append(" /proxypassword:"); - arguments.Append(ProxyPassword); + arguments.Append(String.Format("\"{0}\"", ProxyPassword)); } if (ProxyDomain != null) { arguments.Append(" /proxydomain:"); - arguments.Append(ProxyDomain); + arguments.Append(String.Format("\"{0}\"", ProxyDomain)); } if (UrlKey != null) { arguments.Append(" /appsettingurlkey:"); - arguments.Append(UrlKey); + arguments.Append(String.Format("\"{0}\"", UrlKey)); } if (BaseUrl != null) { arguments.Append(" /appsettingbaseurl:"); - arguments.Append(BaseUrl); + arguments.Append(String.Format("\"{0}\"", BaseUrl)); } - arguments.Append(Path); + arguments.Append(String.Format(" \"{0}\"", Path)); try { _args = arguments.ToString(); @@ -277,6 +277,7 @@ base.ExecuteTask(); } catch (Exception e) { + Console.WriteLine("wsdl arguments: {0}", arguments.ToString()); throw new BuildException(LogPrefix + "ERROR: " + e); } }