2006-12-04 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 4 Dec 2006 10:20:11 +0000 (10:20 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 4 Dec 2006 10:20:11 +0000 (10:20 -0000)
* WebService.cs : implemented SoapVersion as documented in MSDN.

* SoapProtocolImporter.cs : added trivial IsSoapEncodingPresent().

* AnyReturnReader.cs : not sure why, but the build must have been
  broken, and now it is exposed.
* SoapHttpClientProtocol.cs : added missing members, left as MonoTODO.

svn path=/branches/atsushi/mcs/; revision=68936

mcs/class/System.Web.Services/System.Web.Services.Description/ChangeLog
mcs/class/System.Web.Services/System.Web.Services.Description/SoapProtocolImporter.cs
mcs/class/System.Web.Services/System.Web.Services.Protocols/AnyReturnReader.cs
mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapHttpClientProtocol.cs
mcs/class/System.Web.Services/System.Web.Services/ChangeLog
mcs/class/System.Web.Services/System.Web.Services/WebService.cs

index 849d05feaf50c357e888eb8c8d3fa766dcf9f83b..d84fcc69d62027570a58711cea6addd4eeca42f7 100644 (file)
@@ -1,3 +1,7 @@
+2006-12-04  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * SoapProtocolImporter.cs : added trivial IsSoapEncodingPresent().
+
 2006-12-01  Atsushi Enomoto  <atsushi@ximian.com>
 
        * wsdl-1.1-soap.xsd : new file. WSDL 1.1 SOAP binding schema.
index 357d7f88f08a487dcc62070e7b85bea774ef9125..0da9e8db0747e3a24e2c537ad6f28fee17f22a37 100644 (file)
@@ -192,10 +192,14 @@ namespace System.Web.Services.Description {
                        throw new NotImplementedException ();
                }
 
-               [MonoTODO]
+               static readonly char [] whitespaces = new char [] {' ', '\t', '\n', '\r'};
+
                protected virtual bool IsSoapEncodingPresent (string uriList)
                {
-                       throw new NotImplementedException ();
+                       foreach (string s in uriList.Split (whitespaces))
+                               if (s == "http://schemas.xmlsoap.org/soap/encoding/")
+                                       return true;
+                       return false;
                }
 
                protected override CodeMemberMethod GenerateMethod ()
index 225b7dcea27f04024fcc58170df7605cdb714964..7d04b010aed562f06df779a57d466205e19b1c7a 100644 (file)
@@ -47,7 +47,7 @@ namespace System.Web.Services.Protocols {
 
                public override object GetInitializer (LogicalMethodInfo methodInfo)
                {
-                       // do nothing
+                       return null;
                }
 
                public override void Initialize (object o)
index 0d2fff54abbe664d76cca3a4baeba1aef5ca5f67..542240d0e4bfdce36f8f94ed98788c2de1be9abf 100644 (file)
@@ -1,3 +1,9 @@
+2006-12-04  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * AnyReturnReader.cs : not sure why, but the build must have been
+         broken, and now it is exposed.
+       * SoapHttpClientProtocol.cs : added missing members, left as MonoTODO.
+
 2006-12-01  Atsushi Enomoto  <atsushi@ximian.com>
 
        * AnyReturnReader.cs : implemented, it does almost nothing.
index 5f5587db089bbb102611ac845e04eaf4ebbb2692..654cc4b67296095d653daa82c7dc4aad7450747c 100644 (file)
@@ -206,7 +206,27 @@ namespace System.Web.Services.Protocols
                        request.ContentType = message.ContentType + "; charset=utf-8";
                        return request;
                }
-               
+
+#if NET_2_0
+               [MonoTODO]
+               protected virtual
+#endif
+               XmlReader GetReaderForMessage (
+                       SoapClientMessage message, int bufferSize)
+               {
+                       throw new NotImplementedException ();
+               }
+
+#if NET_2_0
+               [MonoTODO]
+               protected virtual
+#endif
+               XmlWriter GetWriterForMessage (
+                       SoapClientMessage message, int bufferSize)
+               {
+                       throw new NotImplementedException ();
+               }
+
                void SendRequest (Stream s, SoapClientMessage message, SoapExtension[] extensions)
                {
                        using (s) {
index 92d34fc12cddaa97cc3e0d6c7560d21677778712..e99fa4af45d8d4b3bee11e8cdc4a6789348ec05a 100644 (file)
@@ -1,3 +1,7 @@
+2006-12-04  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * WebService.cs : implemented SoapVersion as documented in MSDN.
+
 2006-11-15  Atsushi Enomoto  <atsushi@ximian.com>
 
        * WebService.cs: minor API fixes (attributes).
index 1acadee0926d22883feb6921a199fffdb44c3dae..ec84f7161f924f13f0ccb90df23fc634954c6273 100644 (file)
@@ -31,6 +31,7 @@
 using System.ComponentModel;
 using System.Security.Principal;
 using System.Web;
+using System.Web.Services.Protocols;
 using System.Web.SessionState;
 
 namespace System.Web.Services {
@@ -40,6 +41,10 @@ namespace System.Web.Services {
 
                HttpContext _context;
 
+#if NET_2_0
+               SoapProtocolVersion _soapVersion;
+#endif
+
                #endregion // Fields
 
                #region Constructors
@@ -47,6 +52,11 @@ namespace System.Web.Services {
                public WebService ()
                {
                        _context = HttpContext.Current;
+#if NET_2_0
+                       object o = _context.Items ["WebServiceSoapVersion"];
+                       if (o is SoapProtocolVersion)
+                               _soapVersion = (SoapProtocolVersion) o;
+#endif
                }
                
                #endregion // Constructors
@@ -90,11 +100,10 @@ namespace System.Web.Services {
                }
 
 #if NET_2_0
-               [MonoTODO]
                [Browsable (false)]
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
                public System.Web.Services.Protocols.SoapProtocolVersion SoapVersion {
-                       get { throw new NotImplementedException (); }
+                       get { return _soapVersion; }
                }
 #endif