[Mono-bugs] [Bug 52614][Min] New - Soap headers always belong to "tempuri" namespace.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 5 Jan 2004 17:45:44 -0500 (EST)
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 ldavismead@acculence.com.
http://bugzilla.ximian.com/show_bug.cgi?id=52614
--- shadow/52614 2004-01-05 17:45:44.000000000 -0500
+++ shadow/52614.tmp.11306 2004-01-05 17:45:44.000000000 -0500
@@ -0,0 +1,106 @@
+Bug#: 52614
+Product: Mono/Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Linux From Scratch Base 5.0
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: System.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ldavismead@acculence.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Soap headers always belong to "tempuri" namespace.
+
+Description:
+Any type exposed through a web service (because it is a parameter or return
+type, for example) is exposed within the same namespace as the web service.
+ Not so SOAP headers, which are always presented as members of the default
+"http://tempuri.org/".
+
+Reproduction:
+
+With the following .asmx file:
+
+<% @WebService Language="C#" Class="Foo.BarService" %>
+
+using System.Web;
+using System.Web.Services;
+using System.Web.Services.Protocols;
+
+namespace Foo
+{
+ public class FooHeader : SoapHeader
+ {
+ public string FooString;
+ }
+
+ [WebService(Namespace="http://foo.bar.org/")]
+ public class BarService : WebService
+ {
+ public FooHeader FH;
+
+ [WebMethod]
+ [SoapHeader("FH")]
+ public string ReturnsHeaderString()
+ {
+ return FH.FooString;
+ }
+ }
+}
+
+Sending the following request will fail (null reference exception
+deserializing the header):
+
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
+ <Header>
+ <FooHeader xmlns="http://foo.bar.org/">
+ <FooString>Baz</FooString>
+ </FooHeader>
+ </Header>
+ <Body>
+ <ReturnsHeaderString />
+ </Body>
+</Envelope>
+
+The following request will return "Baz":
+
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
+ <Header>
+ <FooHeader xmlns="http://tempuri.org/">
+ <FooString>Baz</FooString>
+ </FooHeader>
+ </Header>
+ <Body>
+ <ReturnsHeaderString />
+ </Body>
+</Envelope>
+
+This behaviour is experienced using mono 0.29; the page is being served by
+XSP 0.8 through mod-mono-server 0.6 with apache 2.0.47. The exception
+logged to the console of the server is as follows:
+System.NullReferenceException: A null value was found where an object
+instance was required
+in <0x00045>
+System.Web.Services.Protocols.SoapTypeStubInfo:GetHeaderSerializer
+(System.Xml.XmlQualifiedName,System.Web.Services.Description.SoapBindingUse)
+in <0x0014c> System.Web.Services.Protocols.WebServiceHelper:ReadHeaders
+(System.Web.Services.Protocols.SoapTypeStubInfo,System.Web.Services.Description.SoapBindingUse,System.Xml.XmlTextReader)
+in <0x00046> System.Web.Services.Protocols.WebServiceHelper:ReadSoapMessage
+(System.Xml.XmlTextReader,System.Web.Services.Protocols.SoapTypeStubInfo,System.Web.Services.Description.SoapBindingUse,System.Xml.Serialization.XmlSerializer,object&,System.Web.Services.Protocols.SoapHeaderCollection&)
+in <0x00ae4>
+System.Web.Services.Protocols.HttpSoapWebServiceHandler:DeserializeRequest
+(System.Web.HttpRequest)
+
+My apologies for the formatting. The location of the exception leads me to
+believe that it is not due to XSP or mod-mono-server. IIS exhibits the
+exact opposite behaviour depicted above: when the tempuri namespace is
+specified, IIS 5.1 will fail to parse the header; it will only do so when
+the "foo.bar.org" namespace is used.
+
+This bug occurs when using a self-contained .asmx page as included above,
+and also when using a code-behind page.