2006-11-02 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Description / SoapProtocolImporter.cs
index 357d7f88f08a487dcc62070e7b85bea774ef9125..1691ec674e574886e020b16bd521808c76ab8cee 100644 (file)
@@ -210,12 +210,10 @@ namespace System.Web.Services.Description {
                                SoapBodyBinding isbb = null;
                                XmlMembersMapping inputMembers = null;
                                
-                               bool isWrapped = CheckIsWrapped ();
-                               
                                isbb = OperationBinding.Input.Extensions.Find (typeof(SoapBodyBinding)) as SoapBodyBinding;
                                if (isbb == null) throw new InvalidOperationException ("Soap body binding not found");
                        
-                               inputMembers = ImportMembersMapping (InputMessage, isbb, style, false, isWrapped);
+                               inputMembers = ImportMembersMapping (InputMessage, isbb, style, false);
                                if (inputMembers == null) throw new InvalidOperationException ("Input message not declared");
                                
                                // If OperationBinding.Output is null, it is an OneWay operation
@@ -227,7 +225,7 @@ namespace System.Web.Services.Description {
                                        osbb = OperationBinding.Output.Extensions.Find (typeof(SoapBodyBinding)) as SoapBodyBinding;
                                        if (osbb == null) throw new InvalidOperationException ("Soap body binding not found");
 
-                                       outputMembers = ImportMembersMapping (OutputMessage, osbb, style, true, isWrapped);
+                                       outputMembers = ImportMembersMapping (OutputMessage, osbb, style, true);
                                        if (outputMembers == null) throw new InvalidOperationException ("Output message not declared");
                                }
                                
@@ -260,18 +258,12 @@ namespace System.Web.Services.Description {
                        }
                }
                
-               bool CheckIsWrapped ()
-               {
-                       return (OutputMessage == null || (OutputMessage.Parts.Count == 1 && OutputMessage.Parts[0].Name == "parameters")) &&
-                                  (InputMessage == null || (InputMessage.Parts.Count == 1 && InputMessage.Parts[0].Name == "parameters"));
-               }
-               
-               XmlMembersMapping ImportMembersMapping (Message msg, SoapBodyBinding sbb, SoapBindingStyle style, bool output, bool wrapped)
+               XmlMembersMapping ImportMembersMapping (Message msg, SoapBodyBinding sbb, SoapBindingStyle style, bool output)
                {
                        string elemName = Operation.Name;
                        if (output) elemName += "Response";
 
-                       if (wrapped)
+                       if (msg.Parts.Count == 1 && msg.Parts[0].Name == "parameters")
                        {
                                // Wrapped parameter style