* SoapProtocolImporter.cs: Only output Required argument for
authorGert Driesen <drieseng@users.sourceforge.net>
Thu, 1 Nov 2007 13:40:59 +0000 (13:40 -0000)
committerGert Driesen <drieseng@users.sourceforge.net>
Thu, 1 Nov 2007 13:40:59 +0000 (13:40 -0000)
SoapHeaderAttribute on .NET 1.0, since it is not used in .NET 1.1 and
higher. Avoids numerous warnings when compiling generated code.

svn path=/trunk/mcs/; revision=88644

mcs/class/System.Web.Services/System.Web.Services.Description/ChangeLog
mcs/class/System.Web.Services/System.Web.Services.Description/SoapProtocolImporter.cs

index 44c33023c31c7a20f9e2fbd2e816ac75e8a312ca..f23c5538422ee88a7dea43477f32e932836942fd 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-01  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * SoapProtocolImporter.cs: Only output Required argument for
+       SoapHeaderAttribute on .NET 1.0, since it is not used in .NET 1.1 and
+       higher. Avoids numerous warnings when compiling generated code.
+
 2007-10-05  Atsushi Enomoto  <atsushi@ximian.com>
 
        * ServiceDescriptionCollection.cs : added missing members.
index 759a4b53621b4bad0532f3dab009660125863f9a..58d98c4300875851fa8dc40d5897356fdd56e1bf 100644 (file)
@@ -638,8 +638,6 @@ namespace System.Web.Services.Description {
                                soapExporter.ExportTypeMapping (map);
                        }
 
-                       bool required = false;
-
                        string varName = headerVariables [map] as string;
                        if (varName == null) 
                        {
@@ -652,7 +650,9 @@ namespace System.Web.Services.Description {
                        
                        CodeAttributeDeclaration att = new CodeAttributeDeclaration ("System.Web.Services.Protocols.SoapHeaderAttribute");
                        att.Arguments.Add (GetArg (varName));
-                       att.Arguments.Add (GetArg ("Required", required));
+#if ONLY_1_0
+                       att.Arguments.Add (GetArg ("Required", false));
+#endif
                        if (direction != SoapHeaderDirection.In) att.Arguments.Add (GetEnumArg ("Direction", "System.Web.Services.Protocols.SoapHeaderDirection", direction.ToString ()));
                        AddCustomAttribute (method, att, true);
                }