2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Protocols / HttpSimpleTypeStubInfo.cs
index 864f2121ee4cd1a5bba94f35b2b93d969003850a..8dc1125601b2f8bca69ce96fece81c0418c8215c 100644 (file)
@@ -7,6 +7,27 @@
 // (C) 2003 Ximian, Inc.
 //
 
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
 using System.Reflection;
 using System.Collections;
 using System.Xml;
@@ -52,6 +73,11 @@ namespace System.Web.Services.Protocols
                                ParameterWriterType = new MimeFormatterInfo (at.ParameterFormatter);
                                ReturnReaderType = new MimeFormatterInfo (at.ReturnFormatter);
                        }
+                       
+                       if (ReturnReaderType == null) {
+                               if (source.IsVoid) ReturnReaderType = new MimeFormatterInfo (typeof(NopReturnReader));
+                               else ReturnReaderType = new MimeFormatterInfo (typeof(XmlReturnReader));
+                       }
                }
        }
        
@@ -71,11 +97,11 @@ namespace System.Web.Services.Protocols
 
        internal class HttpSimpleTypeStubInfo : TypeStubInfo
        {
-               public HttpSimpleTypeStubInfo (Type t): base (t)
+               public HttpSimpleTypeStubInfo (LogicalTypeInfo logicalTypeInfo): base (logicalTypeInfo)
                {
                }
 
-               public override void BuildTypeMethods ()
+               protected override void BuildTypeMethods ()
                {
                        base.BuildTypeMethods ();