简单的web服务code? [英] simple webservice code?

查看:109
本文介绍了简单的web服务code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写在asp.net中一个简单的Web服务code,当我构建服务并运行它工作正常服务。当我尝试访问它给一些问题的web服务,问题意味着我没有得到这个方法(Web服务方法)。在完成编写后webserivce我采取了asp.net页面(的.aspx),并在Solution Explorer中我添加了一个Web服务,它是成功添加。但是当我加入的命名空间是没有得到的服务名称(我不能添加websercice的命名空间

i write a simple webservice code in asp.net when i build the service and run the service it is working fine. when i try to access the webservice it is giving some problem , problem means i am not getting that method (webservice method). After completing writing the webserivce i take a asp.net page (.aspx) and in solution explorer i add a webservices and it is added successfully. but when i adding namespace it is not getting the service name ( i not able to add the namespace of websercice

推荐答案

我不完全相信这可能是问题,但你应该只需要执行以下操作来使用Web服务:

I am not exactly sure what could be the problem but you should only need to do the following to use the web service:

// Look at what you named your web reference, in my example it is
// called MyWebService. Check your solution explorer for the actual name.
// This is the alias you should be using.
MyWebService.YourWebServiceName ws = new MyWebService.YourWebServiceName();
var result = ws.MyMethod(someparameter);

这篇关于简单的web服务code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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