[Mono-dev] Help with xsp

Neale Ferguson NealeFerguson at verizon.net
Thu Sep 19 17:10:59 UTC 2013


At the bottom is the minimal test case that results in the error. If you
rename the 2nd testIt to something else and get rid of the (MessageName...),
there's no problem.

Would someone try it on there platform to check that it's not something I've
done on my system? 

The problem appears to be when
System.Web.Services.Description.BasicProfileChecker.CheckR2305 invokes
System.Web.Services.Description.MessageCollection.get_Item using the string
"TestInt". The IndexOf comes back with -1 which triggers the throw. The call
to IndexOf is:

[  6] . . . . . . ENTER:
System.Web.Services.Description.MessageCollection:IndexOf
(System.WebDescription.Message) ip: 0x3ffd725d0ac sp: 0x3fff4b13a98 -
this[MONO_TYPE_CLASS]: 0x3ffd767ae3:null],ECTT


                public Message this [int index] {
                        get {
                                if (index < 0 || index > Count)
                                        throw new
ArgumentOutOfRangeException ();

                                return (Message) List [index];
                        }
                        set { List [index] = value; }
                }

                public Message this [string name] {
                        get { return this [IndexOf ((Message) Table
[name])]; }
                }

The trace shows:

[  6] . . . . . . ENTER:
System.Web.Services.Description.MessageCollection:IndexOf
(System.WebDescription.Message) ip: 0x3ffd725d0ac sp: 0x3fff4b13a98 -
this[MONO_TYPE_CLASS]: 0x3ffd767ae3:null],ECTT

As far as I can see from the trace, List.Insert is never called to put
things into the table.

-------------------------------------------

<%@ WebService Language="C#" Class="TestService.Testing" %>

using System;
using System.Web.Services;
using System.Xml;
using System.Runtime.InteropServices;

namespace TestService
{
        [WebService (Namespace="http://localhost/TestService",
                     Description="Webservice test case")]
        public class Testing : WebService
        {
                [WebMethod]
                public XmlDocument testIt()
                {
                        XmlDocument doc = new XmlDocument();
                        doc.LoadXml("<TEST>Test Data</TEST>");

                        return(doc);
                }
                [WebMethod (MessageName="testInt")]
                public XmlDocument testIt(int a)
                {
                        XmlDocument doc = new XmlDocument();
                        if (a == 0)
                                doc.LoadXml("<TEST>Test 0</TEST>");
                        else
                                doc.LoadXml("<TEST>Test !0</TEST>");

                        return(doc);
                }
        }
}


On 9/18/13 5:08 AM, "Robert Jordan" <robertj at gmx.net> wrote:

> Neale,
> 
> On 18.09.2013 00:19, Neale Ferguson wrote:
>> I had a webservice that was working fine. I duplicated a routine - same name
>> but with different parameters which requires the MessageName attribute. So
>> for the duplicated routine which originally just had:
>>                  [WebMethod (Description="Process VMARCH QUERY TAPES ALL
>> command")]
>> I changed it to
>>                  [WebMethod (Description="Process VMARCH QUERY TAPES ALL
>> command",
>>                              MessageName="vmaQryTapesAll")]
>> 
>> Pointed browser to: http://localhost:9000/webservice.asmx and now get:
>> 
>> System.ArgumentOutOfRangeException
>> Argument is out of range.
>> 
>> Is there some way to get more informative messages from xsp to get it to
>> tell me exactly what it's choking on? I can invoke the webmethods directly
>> on the browser but it's just this bit that is giving me grief.
> 
> The Web Service overview and test page is generated by
> $prefix/etc/mono/x.x/DefaultWsdlHelpGenerator.aspx,
> where x.x is the .NET version.
> 
> It looks like the exception is thrown when Page_Load of this
> ASPX page is invoking WebServicesInteroperability.CheckConformance.
> 
> That's where I would start looking for issue with overloaded
> WebMethods following back the stack trace.
> 
> Try to get line numbers with
> 
> MONO_OPTIONS=--debug xsp ...
> 
> Robert
> 
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list