【培训课件】Web Services.ppt

上传人:本田雅阁 文档编号:3048325 上传时间:2019-06-30 格式:PPT 页数:22 大小:1.07MB
返回 下载 相关 举报
【培训课件】Web Services.ppt_第1页
第1页 / 共22页
【培训课件】Web Services.ppt_第2页
第2页 / 共22页
【培训课件】Web Services.ppt_第3页
第3页 / 共22页
【培训课件】Web Services.ppt_第4页
第4页 / 共22页
【培训课件】Web Services.ppt_第5页
第5页 / 共22页
点击查看更多>>
资源描述

《【培训课件】Web Services.ppt》由会员分享,可在线阅读,更多相关《【培训课件】Web Services.ppt(22页珍藏版)》请在三一文库上搜索。

1、Web Services,http:/ Web Services,什么是 Web Service? 如何建造 Web Service 如何使用 Web Service 互用(Interop)问题 Q&A,什么是 Web Service?,Web Service 是可通过标准网络协议来访问并实现程控的系统功能。 多种客户端,多种平台 分布式系统构建,Web Service目标,孤立系统和异种平台系统连接 疏松耦合,讯息传递 开放式标准协定 基于稳固可靠的企业级产品,开放式标准,SOAP (Simple Object Access Protocol) 讯息传递的 XML 协定 WSDL (Web

2、Service Description Language) 讯息交换合同 DISCO (Discovery) 发布可用 Web Service 的简单协定 UDDI (Universal Description Discovery and Integration) Web Service 黄页,访问 (SOAP),Web Services 示例,设计时或运行时,运行时,http:/,HTML or XML with link to WSDL,协议 (WSDL),http:/ with service descriptions,http:/ BODY,Web Service,Web Servic

3、e 用户,UDDI,http:/www.uddi.org,Link to DISCO or WSDL document,服务器端的实现,采用 ASP.NET 的程序模型 Web 服务器绑定, URL 利用 ASP.NET 的对象模型(Request, Session, Application, etc.) 利用 ASP.NET process model,服务器端的实现,目标: 使建立 web services 非常简易 文字码源,可用任何编辑器 码源实时编译成执行码 码源文件扩展名 .asmx 码源可在 .asmx 文件中,或编译成单独程序集, 提供Names the class and/o

4、r language used using System.Web.Services; 必需的命名空间 WebMethod Method is web callable 可选择Derive from WebService基类 使用ASP.NET的内在对象 VS .NET设计时支持,服务器端的实现,服务器端实现,帮助页: 描述所提供服务的网页 方法表 (web methods) WSDL 链接 http:/server/*.asmx?WSDL 索取 WSDL 文件,服务器端的实现,演示,客户端的实现,使用命令行工具或 Visual Studio.NET 从 WSDL 文件来产生代理类(proxy

5、class) 源码 WSDL 与平台无关 代理类源码 C#, VB, 或 managed C+ 使用任何 .NET 语言!,客户端的实现,代理类包含服务方法: 同步访问 异步访问 代理类属性包括 鉴认 (Authentication) 服务在线地址 Cookies ,客户端的实现,代理类源码产生后 编译成 DLL 任何应用客户皆可调用 Windows Form, ASP.NET, 甚至另一个 Web Service! 代理类由 XML 序列化和网络类组成 不需服务器功能,客户端的实现,简单代理类 (in VB) Public Class TraceSample Inherits System.

6、Web.Services.Protocols.SoapHttpClientProtocol Public Sub New() MyBase.New Me.Url = “http:/localhost/test/trace.asmx“ End Sub Public Function Add(ByVal i As Integer, ByVal j As Integer) As Integer Dim results() As Object = Me.Invoke(“Add“, New Object() i, j) Return CType(results(0),Integer) End Function End Class,客户端的实现,演示,互用问题,Web Services 是为互用而设计 ASP.NET Web Services 的默认设置是文本型(Document style) 某些 SOAP API 使用 RPC型,如 Apache SOAP 用SoapRpcService 装饰类定义 SoapRpcMethod装饰方法定义,Interop,演示,网上学习资源,http:/ http:/,Questions?,如果您有任何问题,请加入 微软中文新闻组 继续讨论,加入微软中文新闻组 http:/

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1