基于网络服务的问题 [英] webservice based question

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

问题描述

在我之前的采访中,采访者问我有关使用网络服务的问题,我对他的解释如下:


1.右键单击网站/Web应用程序
2.点击添加服务参考
3.将地址放置在托管服务的位置,例如http://..../service.aspmx
4.找到后,单击确定
5.在.cs文件中,我创建了代理类实例&使用该实例,我已经消耗了写入webservice中的web methode


一旦我告诉了我,面试官问我 这是什么类型的对象?客户端或服务器端(或客户端类代理对象或服务器端类代理对象)

解决方案

服务器端.

当您创建简单的Web服务时,它是服务器端对象,但您可以通过完整的Web服务路径将其作为客户端.

当您想使用客户端时,可以像以下示例一样创建启用Ajax的Web服务

母版页"中来自JavaScript的Access Server Side(网络服务) [ ^ ]

针对初学者的AJAX(第3部分)-调用服务器端方法在ASP.NET网站中从JavaScript中使用和使用Web服务 [在ASP.NET 3.5中使用JSON [ ^ ]

In my previous interview , interviewer asked me about consuming web service , i told him as below


1. Right click on website / web application
2. click on Add service reference
3. Put the address where service is hosted e.g. http://..../service.aspmx
4. once found click on ok
5. in the .cs file i have created proxy class instance & using that instance i have consume web methode written into the webservice


once i told this , interviewer asked me what type of object it is? client side or server side(or client side class proxy object or server side class proxy object)

解决方案

SERVER SIDE.

When you create simple web service then it is server side object but you can get it client side with full path of web service.

When you want use client side then you can create Ajax enabled web service like this example

Access Server Side (webservice) from JavaScript in Master Page[^]

AJAX for Beginners (Part 3) - Calling Server Side Methods and Consuming Web Services from JavaScript in an ASP.NET website[^]

Using JSON with ASP.NET 3.5[^]


这篇关于基于网络服务的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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