Web服务在类名中更改问题 [英] Web services question change in class name

查看:84
本文介绍了Web服务在类名中更改问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我是webservices的新手。我刚尝试了我的第一个网络服务pgm。我试着改变班级的名字。我得到一个Parse错误



Hi,

I am new to webservices. I just tried my first web service pgm. I tried to change the name of class. I get a Parse error

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace Test
{
    /// <summary>
    /// Summary description for Test
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
    // [System.Web.Script.Services.ScriptService]
    public class Test : System.Web.Services.WebService
    {

        [WebMethod]
        public int CalculateAdd(int firstnumber, int secondnumber)
        {
            return firstnumber+secondnumber;
        }
    }
}







请帮助。谢谢!




Please help. Thanks!

推荐答案

您需要在客户端刷新服务引用以使用新方法。
You will need to refresh the service reference at the client to use the new method.


这篇关于Web服务在类名中更改问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆