webservice - 未知的Web方法参数名称methodname

ch3*_*r1f 4 jquery web-services asmx fullcalendar

我调用了一个web服务来获取fullcalendar中的项目.永远不会调用该方法,firebug会给出以下错误:

*"POST [http]:// localhost:50536/FullCalendar/ServicioFullCalendar.asmx/GetEventosCalendario POST [http]:// localhost:50536/FullCalendar/ServicioFullCalendar.asmx/GetEventosCalendario

500内部服务器错误1.01s""未知的Web方法参数名称methodname"*

这是asmx.vb代码:

    <System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://localhost/uva/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class ServicioFullCalendar
    Inherits System.Web.Services.WebService

    <ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
    <WebMethod(MessageName:="ObtieneEventos")> _
    Public Shared Function GetEventosCalendario(ByVal startDate As String, ByVal endDate As String) As String
        Try
            Return CalendarioMensualDAO.Instance.getEventos(startDate, endDate)

        Catch ex As Exception
            Throw New Exception("FullCalendar:GetEventos: " & ex.Message)
        Finally

        End Try
    End Function
Run Code Online (Sandbox Code Playgroud)

web服务从fullcalendar"加载",如下所示:

events: "ServicioFullCalendar.asmx/GetEventosCalendario",
Run Code Online (Sandbox Code Playgroud)

ch3*_*r1f 11

这是错误的:方法必须是"不共享",没有"消息名称":

<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
<WebMethod()> _
Public Function GetEventosCalendario(ByVal startDate As String, ByVal endDate As String) As String
    Try
        Return CalendarioMensualDAO.Instance.getEventos(startDate, endDate)

    Catch ex As Exception
        Throw New Exception("FullCalendar:getEventos: " & ex.Message)
    Finally

    End Try
End Function
Run Code Online (Sandbox Code Playgroud)