[Mono-bugs] [Bug 589515] New: ASMX web service implementing interface with SoapHeaderAttribute does not work

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Mar 18 16:42:25 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=589515

http://bugzilla.novell.com/show_bug.cgi?id=589515#c0


           Summary: ASMX web service implementing interface with
                    SoapHeaderAttribute does not work
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 1.2.0
          Platform: x86-64
        OS/Version: SuSE 8.2
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web.Services
        AssignedTo: atsushi at ximian.com
        ReportedBy: jlew at liquidmachines.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2)
Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)

Using a WSDL.EXE-generated server interface like the one below.  Note the
presence of the SoapHeader attribute, which declares that the web method
response must include a "SessionInfoHeaderValue" header:

    [Some webservice-related attributes]
    public interface ICommonServiceSoapBinding
    {
        /// <remarks/>
        [Some webservice-related attributes]
        [SoapHeader("SessionInfoHeaderValue", Direction =
SoapHeaderDirection.Out)] 
        void SomeWebMethod(args);
    }

..then we have the ASMX class that implements this interface...

<%@ WebService Language="C#" Class="CommonService" %>
public class CommonService: WebService, ICommonServiceSoapBinding
{
  [...web methods...]

  /*Field for the SOAP header *
  public SessionInfoHeader SessionInfoHeaderValue; 

}

When you attempt to access this web service, an exception occurs:

Member SessionInfoHeaderValue not found in class
Lqmi.Auth.ICommonServiceSoapBinding.

Description: HTTP 500. Error processing request.

Stack Trace:

System.InvalidOperationException: Member SessionInfoHeaderValue not found in
class ICommonServiceSoapBinding.
  at System.Web.Services.Protocols.SoapMethodStubInfo..ctor
(System.Web.Services.Protocols.TypeStubInfo typeStub,
System.Web.Services.Protocols.LogicalMethodInfo source, System.Object kind,
System.Xml.Serialization.XmlReflectionImporter xmlImporter,
System.Xml.Serialization.SoapReflectionImporter soapImporter) [0x00000] 
  at System.Web.Services.Protocols.SoapTypeStubInfo.CreateMethodStubInfo
(System.Web.Services.Protocols.TypeStubInfo parent,
System.Web.Services.Protocols.LogicalMethodInfo lmi, Boolean isClientProxy)
[0x00000] 
  at System.Web.Services.Protocols.TypeStubInfo.BuildTypeMethods () [0x00000] 
  at System.Web.Services.Protocols.TypeStubInfo.Initialize () [0x00000] 
  at System.Web.Services.Protocols.LogicalTypeInfo.CreateTypeStubInfo
(System.Type type) [0x00000] 
  at System.Web.Services.Protocols.LogicalTypeInfo.GetTypeStub (System.String
protocolName) [0x00000] 
  at System.Web.Services.Protocols.TypeStubManager.GetTypeStub (System.Type t,
System.String protocolName) [0x00000] 
  at System.Web.Services.Protocols.SoapDocumentationHandler..ctor (System.Type
type, System.Web.HttpContext context) [0x00000] 
  at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler
(System.Web.HttpContext context, System.String verb, System.String url,
System.String filePath) [0x00000] 
  at System.Web.Script.Services.ScriptHandlerFactory.GetHandler
(System.Web.HttpContext context, System.String requestType, System.String url,
System.String pathTranslated) [0x00000] 
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url, Boolean ignoreContextHandler) [0x00000] 
  at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context,
System.String url) [0x00000] 
  at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x00000] 

The ASMX handler is looking via reflection for a member named
SessionInfoHeaderValue in the interface, when it exists in the class that
implements the interface.  The reflection code should look in derived types as
well as the type where the WebMethod is actually attributed.  This works
correctly in .NET


Reproducible: Always

Steps to Reproduce:
1. Implement an ASMX web service with the conditions described in the "details"
section.
2. Deploy the service and visit the endpoint
(http://server/service_site/service.asmx) in a web browser.

Actual Results:  
exception indicating failure to load the ASMX handler.

Expected Results:  
Service documentation should appear

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list