[Mono-bugs] [Bug 501383] New: WebService exposing a WebMethod with a MessageName different from the actual method namecauses exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed May 6 10:59:56 EDT 2009


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


           Summary: WebService exposing a WebMethod with a MessageName
                    different from the actual method namecauses exception
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: i686
        OS/Version: SLES 11
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: webservices at landmarkdigital.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b5)
Gecko/2008032600 SUSE/2.9.95-25.1 Firefox/3.0b5

If a WebService class is created which exposes a WebMethod with a MessageName
parameter that is different from the actual method name, the runtime throws an
ArgumentOutOfRangeException.

In the attached code, if the MessageName is commented out or specified as the
exact same name as the method name, the service is presented correctly by the
mono runtime.  In our testing, any MessageName different from the method name
causes an error. 

Reproducible: Always

Steps to Reproduce:
  [System.Web.Services.WebService(
    Name = "TestService"
  )]
  public class TestService : System.Web.Services.WebService
  {
    [System.Web.Services.WebMethod(
      MessageName = "TestMethod1"
    )]
    public void TestMethod ()
    {
    }
  }

Actual Results:  
Server Error in '/Update' Application
Argument is out of range.

Description: HTTP 500. Error processing request.

Stack Trace:

System.ArgumentOutOfRangeException: Argument is out of range.
  at System.Web.Services.Description.MessageCollection.get_Item (Int32 index)
[0x00000] 
  at System.Web.Services.Description.MessageCollection.get_Item (System.String
name) [0x00000] 
  at System.Web.Services.Description.BasicProfileChecker.CheckR2305
(System.Web.Services.Description.ConformanceCheckContext ctx,
System.Web.Services.Description.Operation value) [0x00000] 
  at System.Web.Services.Description.BasicProfileChecker.Check
(System.Web.Services.Description.ConformanceCheckContext ctx,
System.Web.Services.Description.Operation value) [0x00000] 
  at System.Web.Services.Description.WebServicesInteroperability.Check
(System.Web.Services.Description.ConformanceCheckContext ctx,
System.Web.Services.Description.ConformanceChecker checker,
System.Web.Services.Description.ServiceDescription sd) [0x00000] 
  at System.Web.Services.Description.WebServicesInteroperability.Check
(WsiProfiles claims, System.Web.Services.Description.ConformanceCheckContext
ctx, IEnumerable documents) [0x00000] 
  at
System.Web.Services.Description.WebServicesInteroperability.CheckConformance
(WsiProfiles claims,
System.Web.Services.Description.ServiceDescriptionCollection services,
System.Web.Services.Description.BasicProfileViolationCollection violations)
[0x00000] 
  at ASP.DefaultWsdlHelpGenerator_aspx.Page_Load (System.Object sender,
System.EventArgs e) [0x00000] 
  at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000] 
  at System.Web.UI.Control.LoadRecursive () [0x00000] 
  at System.Web.UI.Page.ProcessLoad () [0x00000] 
  at System.Web.UI.Page.ProcessPostData () [0x00000] 
  at System.Web.UI.Page.InternalProcessRequest () [0x00000] 
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
[0x00000] 

Version information: Mono Version: 2.0.50727.1433; ASP.NET Version:
2.0.50727.1433

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


More information about the mono-bugs mailing list