#if !NET_2_0\r
\r
using System;\r
+using System.Collections.Specialized;\r
using System.Xml;\r
using System.Xml.Schema;\r
using System.Collections;\r
string password;\r
string domain;\r
\r
- string url;\r
+ StringCollection urls = new StringCollection ();\r
string className;\r
\r
///\r
else\r
{\r
hasURL = true;\r
- url = argument;\r
+ urls.Add (argument);\r
return;\r
}\r
\r
default:\r
if (argument.StartsWith ("/") && argument.IndexOfAny (Path.InvalidPathChars) == -1) {\r
hasURL = true;\r
- url = argument;\r
+ urls.Add (argument);\r
break;\r
}\r
else\r
return 0;\r
}\r
\r
- if (className == null)\r
- {\r
+ if (className == null) {\r
DiscoveryClientProtocol dcc = CreateClient ();\r
- dcc.AllowAutoRedirect = true;\r
- \r
- if (!url.StartsWith ("http://") && !url.StartsWith ("https://") && !url.StartsWith ("file://"))\r
- url = new Uri (Path.GetFullPath (url)).ToString ();\r
- \r
- dcc.DiscoverAny (url);\r
- dcc.ResolveAll ();\r
- \r
- foreach (object doc in dcc.Documents.Values)\r
- {\r
+\r
+ foreach (string urlEntry in urls) {\r
+ string url = urlEntry;\r
+ dcc.AllowAutoRedirect = true;\r
+ if (!url.StartsWith ("http://") && !url.StartsWith ("https://") && !url.StartsWith ("file://"))\r
+ url = new Uri (Path.GetFullPath (url)).ToString ();\r
+ \r
+ dcc.DiscoverAny (url);\r
+ dcc.ResolveAll ();\r
+ }\r
+\r
+ foreach (object doc in dcc.Documents.Values) {\r
if (doc is ServiceDescription)\r
- descriptions.Add ((ServiceDescription)doc);\r
+ descriptions.Add ((ServiceDescription) doc);\r
else if (doc is XmlSchema)\r
- schemas.Add ((XmlSchema)doc);\r
+ schemas.Add ((XmlSchema) doc);\r
}\r
- \r
- if (descriptions.Count == 0)\r
- throw new Exception ("No WSDL document was found at the url " + url);\r
- }\r
- else\r
- {\r
+\r
+ if (descriptions.Count == 0) {\r
+ Console.WriteLine ("Warning: no classes were generated.");\r
+ return 0;\r
+ }\r
+ } else {\r
string[] names = className.Split (',');\r
if (names.Length != 2) throw new Exception ("Invalid parameter value for 'type'");\r
string cls = names[0].Trim ();\r
Type t = asm.GetType (cls);\r
if (t == null) throw new Exception ("Type '" + cls + "' not found in assembly " + assembly);\r
ServiceDescriptionReflector reflector = new ServiceDescriptionReflector ();\r
- reflector.Reflect (t, url);\r
+ foreach (string url in urls)\r
+ reflector.Reflect (t, url);\r
foreach (XmlSchema s in reflector.Schemas)\r
schemas.Add (s);\r
\r