Author: gert
Date: 2007-11-01 08:27:08 -0500 (Thu, 01 Nov 2007)
New Revision: 88642
Modified:
trunk/mcs/tools/wsdl/ChangeLog
trunk/mcs/tools/wsdl/MonoWSDL.cs
trunk/mcs/tools/wsdl/MonoWSDL2.cs
Log:
* MonoWSDL.cs: Backport part of fix for bug #336739 to WSDL for
1.0 profile. Output warning if no WSDLs were specified.
Modified: trunk/mcs/tools/wsdl/ChangeLog
===================================================================
--- trunk/mcs/tools/wsdl/ChangeLog 2007-11-01 13:08:42 UTC (rev 88641)
+++ trunk/mcs/tools/wsdl/ChangeLog 2007-11-01 13:27:08 UTC (rev 88642)
@@ -1,3 +1,8 @@
+2007-11-01 Get Driesen <[EMAIL PROTECTED]>
+
+ * MonoWSDL.cs: Backport part of fix for bug #336739 to WSDL for
+ 1.0 profile. Output warning if no WSDLs were specified.
+
2007-11-01 Atsushi Enomoto <[EMAIL PROTECTED]>
* MonoWSDL2.cs : it should be able to handle xml schemas that are
Modified: trunk/mcs/tools/wsdl/MonoWSDL.cs
===================================================================
--- trunk/mcs/tools/wsdl/MonoWSDL.cs 2007-11-01 13:08:42 UTC (rev 88641)
+++ trunk/mcs/tools/wsdl/MonoWSDL.cs 2007-11-01 13:27:08 UTC (rev 88642)
@@ -528,32 +528,31 @@
return 0;
}
- if (className == null)
- {
- foreach (string urlEntry in urls) {
- string url = urlEntry;
+ if (className == null) {
DiscoveryClientProtocol dcc =
CreateClient ();
- dcc.AllowAutoRedirect = true;
- if (!url.StartsWith ("http://") &&
!url.StartsWith ("https://") && !url.StartsWith ("file://"))
- url = new Uri (Path.GetFullPath
(url)).ToString ();
-
- dcc.DiscoverAny (url);
- dcc.ResolveAll ();
-
- foreach (object doc in
dcc.Documents.Values)
- {
+
+ foreach (string urlEntry in urls) {
+ string url = urlEntry;
+ dcc.AllowAutoRedirect = true;
+ if (!url.StartsWith ("http://")
&& !url.StartsWith ("https://") && !url.StartsWith ("file://"))
+ url = new Uri
(Path.GetFullPath (url)).ToString ();
+
+ dcc.DiscoverAny (url);
+ dcc.ResolveAll ();
+ }
+
+ foreach (object doc in
dcc.Documents.Values) {
if (doc is ServiceDescription)
- descriptions.Add
((ServiceDescription)doc);
+ descriptions.Add
((ServiceDescription) doc);
else if (doc is XmlSchema)
- schemas.Add
((XmlSchema)doc);
+ schemas.Add
((XmlSchema) doc);
}
-
- if (descriptions.Count == 0)
- throw new Exception ("No WSDL
document was found at the url " + url);
- }
- }
- else
- {
+
+ if (descriptions.Count == 0) {
+ Console.WriteLine ("Warning: no
classes were generated.");
+ return 0;
+ }
+ } else {
string[] names = className.Split (',');
if (names.Length != 2) throw new
Exception ("Invalid parameter value for 'type'");
string cls = names[0].Trim ();
Property changes on: trunk/mcs/tools/wsdl/MonoWSDL.cs
___________________________________________________________________
Name: svn:eol-style
+ CRLF
Property changes on: trunk/mcs/tools/wsdl/MonoWSDL2.cs
___________________________________________________________________
Name: svn:eol-style
+ CRLF
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches