谁能解释如何在现有应用程序中使用Web服务? [英] Can anyone explain how to use webservice in existing application?

查看:77
本文介绍了谁能解释如何在现有应用程序中使用Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以解释如何在现有应用程序中使用Web服务吗?

Can anyone explain how to use webservice in existing application?

推荐答案

您好,朋友取决于您的应用程序流程,意味着您要遵循哪种架构. br/>
但您只需尝试使用正常步骤即可访问您的Webservice方法..
1种方式...

1)将您的Web服务的Web参考添加到您的应用程序中
2)在页面后面的代码中创建Web服务引用的对象.
3)现在只需使用该对象名称调用您的Web方法.(点)您的方法名称
或者如果您的方法正在获取参数,则在调用它时将其传递给它.

2种方式...

您还可以使用jQuery和Ajax调用来调用您的Web方法
如何使用ASP.NET AJAX从客户端JavaScript调用Web服务 [调用Web服务 [
Hello friend its depends on your flow of application, means which type of architecture you follow.

but simply you can try this to access your webservice method using this normal steps..
1 Way...

1) add web reference of your web service to your application
2) Create a Object of your webservice reference in your code behind page.
3) now simply call your webmethods using that objectname.(dot) your method name
or if your method is getting parameters then pass it to it when you call it.

2 Way...

You Can also call your web method using jQuery and Ajax call
How to call a Web Service from client-side JavaScript using ASP.NET AJAX[^]
Calling Web service[^]


在服务器端
使用ASP.NET调用Web服务 [ http://geekswithblogs.net/thanigai/archive/2009/10/30/calling-asp.net-webservice-from-jquery.aspx [
on server side
Calling Web Service using ASP.NET[^]

on Client side
http://geekswithblogs.net/thanigai/archive/2009/10/30/calling-asp.net-webservice-from-jquery.aspx[^]


这篇关于谁能解释如何在现有应用程序中使用Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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