[Mono-bugs] [Bug 60409][Nor] New - Unknown soap headers are not being read

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 18 Jun 2004 06:51:22 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lluis@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=60409

--- shadow/60409	2004-06-18 06:51:22.000000000 -0400
+++ shadow/60409.tmp.12628	2004-06-18 06:51:22.000000000 -0400
@@ -0,0 +1,94 @@
+Bug#: 60409
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web.Services
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lluis@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Summary: Unknown soap headers are not being read
+
+ASP.NET throws an exception when accessing a web service that declares
+unknown headers.
+
+1. This happens always
+ 
+2. Here is the sample code
+ 
+<%@ WebService Language="c#"  Class="Test.Request1" %>
+<%@ Assembly name="System.Web.Services" %>
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Data;
+using System.Diagnostics;
+using System.Web;
+using System.Web.Services;
+using System.Web.Services.Protocols;
+ 
+namespace Test
+{
+ /// <summary>
+ /// Summary description for Request.
+ /// </summary>
+ [WebService(Namespace="urn:abs.gov.au/webservices")]
+ public class Request1 : System.Web.Services.WebService
+ {
+  public SoapUnknownHeader[] unknownHeaders;
+ 
+  public Request1()
+  {
+   //CODEGEN: This call is required by the ASP.NET Web Services Designer
+   InitializeComponent();
+  }
+ 
+  #region Component Designer generated code
+ 
+  //Required by the Web Services Designer
+  private IContainer components = null;
+ 
+  /// <summary>
+  /// Required method for Designer support - do not modify
+  /// the contents of this method with the code editor.
+  /// </summary>
+  private void InitializeComponent()
+  {
+  }
+ 
+  /// <summary>
+  /// Clean up any resources being used.
+  /// </summary>
+  protected override void Dispose( bool disposing )
+  {
+   if(disposing && components != null)
+   {
+    components.Dispose();
+   }
+   base.Dispose(disposing);
+  }
+ 
+  #endregion
+ 
+  [WebMethod]
+  [System.Web.Services.Protocols.SoapHeaderAttribute("unknownHeaders")]
+  public string Receive(string Command)
+  {
+   try
+   {
+    return Command;
+   }
+   catch (Exception ex)
+   {
+    return ex.Message;
+   }
+ 
+  }
+ }
+}