return 0;\r
}\r
\r
- if (className == null)\r
- {\r
- foreach (string urlEntry in urls) {\r
- string url = urlEntry;\r
+ if (className == null) {\r
DiscoveryClientProtocol dcc = CreateClient ();\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
- 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
- }\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