All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
教你轻松给流程增加权限控制程序_.net资料_编程技术
SQL,Server的恢复模式_mssql学习_编程技术
利用PHP自定义错误处理器处理出错信息_php资料_编程技术
防刷新重复提交、防后退方法_[Asp.Net教程]
PHP下一代的五个framework介绍_[PHP教程]
ASP.NET的本质之IIS以及进程模式_.net资料_编程技术
Discuz!,X-Space下的二级域名配置_php资料_编程技术
技巧:PHP关于中文汉字替换与模式匹配的问题_php资料_编程技术
Asp.NET大文件上传开发总结(一)_[Asp.Net教程]
GridView中绑定日期字段格式的定义_[Asp.Net教程]
Reading number is top 10 pictures
Terrorist smile the largest human history an explosion2
Household design of gorgeous series
Sora aoi mirror memorial classics2
The household of rural style is designed
中国女孩大胆自拍,显露完美身材2
人美胸美腿更美4
程序员的悲哀
中国女孩大胆自拍,显露完美身材
迷人的靓女
From China fortress sora aoi3
Download software ranking
超级战舰
Photoshop 8.0图象编辑软件
Wild things 2
Kung fu panda - the secret of the teacher
Boxer's Top ten classic battle7
C#编程思想
The hero
电脑知识及技巧大合集
美女游泳记
Tram sex maniac 2 (H) rar bag10
qq published in(发表于) 2014/7/11 9:23:11 Edit(编辑)
C#教程:Web服务概述

C#教程:Web服务概述

C#教程:Web服务概述

Web服务概述

Web Service即Web服务,所谓Web服务就是系统提供一组接口,并通过接口使用系统提供的功能。在Windows系统中,应用程序通过API函数使用系统提供的服务;而Web服务站点之间,如果想要使用其他站点的资源,就需要使用站点Web服务。

Web服务是建立可交互操作的分布式应用程序的新平台,它是一套标准,用来定义应用程序如何在Web上实现操作。在这个新平台上,开发人员可以使用任何.Net Framework框架支持的语言,以及在任何操作系统平台上进行编程,只要遵循Web服务标准,就能实现Web服务。

Web服务的核心特征之一就是存在于实现和使用服务之间的高度抽象。通过使用基于XML的消息作为创建访问的机制,而Web客户端和Web服务提供之间,除了请求和响应之外,彼此之间不需要知道对方任何情况。

Web服务是建立在一些通用协议的基础上的,如HTTP、XML SOAP、WSDL和UDDI协议等,这些协议跟操作系统的对象模型和编程语言是无关。下面就详细介绍这些协议。

XML(可扩展标记语言)是Web服务平台中表示数据和交换数据的基本格式。XML文件的主要优点在于它与平台和厂商无关。下面简单创建一个XML文件的代码:





C#技术大全/TITLE><br /><br/><PAGES>628</PAGES><br /><br/></BOOK><br /><br/>在上述XML文件中,第一行是一个XML声明,表明文档是遵循的,是XML 1.0版的规范,第二行定义文档的第一个根元素(Element),值得注意的是,XML其根元素名是可以随意定义的,然后定义了两个子元素TITLE和PAGES。<br /><br/>SOAP(Simple Object Access Protocol)简单对象访问协议,它是一个简单的、轻量级的基于XML的协议,用于交换Web上结构化和模式化的信息。SOAP的总体设计目标是使它尽可能保持简单,并且提供最少的功能。SOAP协议规范由4个主要的组成部分。<br /><br/>第一部分:SOAP封装(Envelop)定义了一个描述并处理内容信息的框架。<br /><br/>第二部分:SOAP编码规则(Encoding Rules)定义了可选数据编码规则,用于表示应用程序定义的数据类型和直接图表,以及一个用于序列化非语法数据模型统一模型。<br /><br/>第三部分:SOAP RPC表示(RPC Representation)定义一个远程调用风格(请求/响应)信息交换的模式。<br /><br/>第四部分:SOAP绑定(Binding)定义了SOAP和HTTP之间的绑定以及使用底层协议的交换。<br /><br/>SOAP协议可以简单地理解为:SOAP=RPC+HTTP+XML,即采用HTTP作为通信协议,RPC作为一致性的调用途径,XML作为数据传送的格式,从而允许服务提供者和服务客户经过防火墙在Internet上进行通信交互。<br /><br/>WSDL(Web Service Define Language)Web服务描述语言,它是一个建议性标准,用于描述Web服务的技术调用语法。WSDL文档将Web服务定义为服务访问点或端口的集合。WSDL文档被分为两种类型:服务实现(service implementations)和服务接口(service interface),其中服务接口包含用于实现一个或多个服务的WSDL服务定义,它是Web服务的抽象定义,并被用于描述某种特定类型的服务。服务实现文档包含实现一个服务接口的服务的描述。一个完整的WSDL服务描述是由一个服务接口和一个服务实现文档组成的。<br /><br/>UDDI(Universal Description Discovery and Integration)统一描述发现和集成协议,定义了一种发布和发现网络服务信息的方式。它是一套公开实现的规则,通常被看作是Web服务的基石,另外它还定义了一个标准的方法,在面向服务架构(SOA)中发布和发现基于网络软件的组件。</p> <br/> </div> </td> </tr> <tr> <td colspan='3' style='width:800px; height:auto;'> <iframe id='iframepage' name='iframepage' src='../../ForJavaScript1.aspx?newsId=27822&pageIndex=1' scrolling=no frameborder='0' width='100%' onLoad='iFrameHeight()' > </iframe> </td> </tr> </table> </center> </div> </td> <td style='width:200px; height:auto; vertical-align:top;'> <div> <table> <tr> <td style='width:200px; height:auto;'> <div><script language="JavaScript" src="../../js/guanggaointexthtmlright1.js" type="text/javascript"></script></div> </td> </tr> <tr> <td style='width:200px; height:auto;'> <div><script language="JavaScript" src="../../js/guanggaointexthtmlright2.js" type="text/javascript"></script></div> </td> </tr> </table> </div> </td> </tr> </table> <hr style="width:1200px; height:1px;" /> <table> <tr> <td align="left"> <div><script language="JavaScript" src="../../js/guanggaoinhtmlend.js" type="text/javascript"></script></div> </td> </tr> <tr> <td align="left"> <div><script language="JavaScript" src="../../js/guanggaoinhtmlend2.js" type="text/javascript"></script></div> </td> </tr> </table> </center> </div> </form> </center> <hr style="width:1200px; height:1px;" /> <center> <a href="http://del.icio.us/post" onclick="window.open('http://del.icio.us/post?v=4&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=700,height=400'); return false;"><img alt="添加到del.icio.us" src='../ico_share/ico_delicious.gif' border="0" /></a> <a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange ().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=2008&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();" title="收藏的网页将被永久地保存到爱问ViVi收藏夹http://vivi.sina.com.cn"><img alt="添加到新浪ViVi" src='../ico_share/ico_vivi.gif' border="0" /></a> <a href="javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0" style="color:#000000;text-decoration:none;font-size:12px;font-weight:normal"><img alt="添加到百度搜藏" src='../ico_share/ico_baidu.gif' border="0" /></a> <a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange ().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://my.poco.cn/fav/storeIt.php?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'_blank','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));" title="收藏到POCO网摘http://share.poco.cn"><img alt="添加到POCO网摘" src='../ico_share/ico_poco.gif' border="0" /></a> <a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();" title="功能强大的网络收藏夹,一秒钟操作就可以轻松实现保存带来的价值、分享带来的快乐"><img alt="添加到天天网摘365Key" src='../ico_share/ico_365key.gif' border="0" /></a> <a href="javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));"><img alt="添加到和讯网摘" src='../ico_share/ico_hexun.gif' border="0" /></a> <a href="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(yesky=window.open('http://hot.yesky.com/dp.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&st=2','_blank','scrollbars=no,width=400,height=480,left=75,top=20,status=no,resizable=yes'));yesky.focus();"title="推荐到天极网摘 http://hot.my.yesky.com [鼠标划选本文摘要,然后点击本图片]"><img alt="添加到天极网摘" src='../ico_share/ico_yesky.gif' border="0" /></a> <a href="javascript:desc='';via='';if(document.referrer)via=document.referrer;if(typeof(_ref)!='undefined')via=_ref;if(window.getSelection)desc=window.getSelection();if(document.getSelection)desc=document.getSelection();if(document.selection)desc=document.selection.createRange().text;void(open('http://www.hemidemi.com/user_bookmark/new?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(desc)+'&via='+encodeURIComponent(via)));"><img alt="添加到黑米书签" src='../ico_share/ico_hemidemi.gif' border="0" /></a> <a href="javascript:window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)"><img alt="添加到QQ书签" src='../ico_share/ico_qq.gif' border="0" /></a> <a href="#" onclick="window.open('http://myweb.cn.yahoo.com/popadd.html?url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title), 'Yahoo','scrollbars=yes,width=780,height=550,left=80,top=80,status=yes,resizable=yes');"><img alt="添加到雅虎收藏" src='../ico_share/ico_yahoo.gif' border="0" /></a> <a title="推荐到diglog" href="javascript://" onclick="javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.diglog.com/submit.aspx?title='+escape(d.title)+'&url='+escape(d.location.href)+'&description='+escape(t),'keyit','resizable,location,menubar,toolbar,scrollbars,status'));keyit.focus();"><img alt="添加到奇客发现" src='../ico_share/ico_diglog.gif' border="0" /></a> <a href="#" onclick="var s=document.createElement('script');s.type='text/javascript';s.src='http://www.diigo.com/javascripts/webtoolbar/diigolet_b_h_b.js';document.body.appendChild(s);"><img alt="diigo it" src='../ico_share/ico_diigo.gif' border="0" /></a> <a href="javascript:var d=document,w=window,f='http://fanfou.com/share',l=d.location,e=encodeURIComponent,p='?u='+e(l.href)+'?t='+e(d.title)+'?d='+e(w.getSelection?w.getSelection().toString():d.getSelection?d.getSelection():d.selection.createRange().text)+'?s=bl';if(!w.open(f+'r'+p,'sharer','toolbar=0,status=0,width=600,height=400')){l.href=f+'.new'+p;}void(0)"><img alt="添加到饭否" src='../ico_share/ico_fanfou.gif' border="0" /></a> <a target=_blank href="http://www.feedou.com/addchannelservlet?commandkey=takersslog&url=http://digimarketing.cn/modules/article/xml.php?rss"><img alt="添加到飞豆订阅" src='../ico_share/ico_feedou.gif' border="0" /></a> <a target=_blank href="http://www.zhuaxia.com/add_channel.php?sourceid=102&url=http%3A%2F%2Fdigimarketing.cn"><img alt="添加到抓虾收藏" src='../ico_share/ico_zhuaxia.gif' border="0" /></a> <a target="_blank" href="http://www.xianguo.com/subscribe.php?url=digimarketing.cn"><img alt="添加到鲜果订阅" src='../ico_share/ico_xianguo.gif' border="0" /></a> <a href="javascript:;" onclick="window.open('http://digg.com/submit?phase=2&url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title)); return false;"><img alt="digg it" src='../ico_share/ico_digg.gif' border="0" /></a> <a target=_blank href="http://funp.com/push/submit/add.php?&via=tools" title="貼到funP"><img alt="貼到funP" src='../ico_share/ico_funp.gif' border="0" /></a> <a target="_blank" href="http://reader.yodao.com/b.do?url=digimarketing.cn"><img alt="添加到有道阅读" src='../ico_share/ico_yodao.gif' border="0" /></a> <a href="javascript:;" onclick="window.open('http://favorites.live.com/quickadd.aspx?url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title)); return false;"><img alt="Live Favorites" src='../ico_share/ico_windows.gif' border="0" /></a> <a href="javascript:;" onclick="window.open('http://www.newsvine.com/_tools/seed&save?popoff=0&u=' + encodeURIComponent(location.href) + '&h=' + encodeURIComponent(document.title)); return false;"><img alt="添加到Newsvine" src='../ico_share/ico_newsvine.gif' border="0" /></a> <a onclick="javascript:window.print();" href="javascript:;"><img src="../ico_share/ico_print.gif" alt="打印本页" border="0" /></a> <a onclick='javascript:window.location="mailto:?subject=[ Enter your own subject line ]& body=" + "Check out this link: " + window.location;' href="javascript:;"><img alt="用Email发送本页" src='../ico_share/ico_mail.gif' border="0" /></a> <script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436,scrollbars=1, resizable=1');return false;}</script> <a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link"><img alt="在Facebook上分享" src='../ico_share/ico_fb.jpg' border="0" /></a> </center> <hr style="width:1200px; height:1px;" /> <center > <!--网站底部--> <div style=" width:1200px; height:100px; background-color:#FFFFFF;"> <hr style=" width:1200px; height:1px;"/> <table> <tr style=" height:50px; width:1200px;"> <td align="center" style="height:50px;"> <a href="../../disclaimer.html" style="font-family:黑体; font-size:small; color:#555;" target="_blank">Disclaimer</a> </td> <td align="center" style="height:50px;"> <a href="../../privacy policy.html" style="font-family:黑体; font-size:small; color:#555;" target="_blank">Privacy Policy</a> </td> <td align="center" style="height:50px;"> <a href="../../AboutUs.html" style="font-family:黑体; font-size:small; color:#555;" target="_blank">About us</a> </td> <td align="center" style="height:50px;"> <a href="../../SiteMap.html" style="font-family:黑体; font-size:small; color:#555;" target="_blank">Site Map</a> </td> <td align="center" style="height:50px;"> <!--百度网站统计--> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fcd1d276abd98aad311a7e9ab1f772b56' type='text/javascript'%3E%3C/script%3E")); </script> </td> <td align="center" style="height:50px;"> </td> <td align="center" style="height:50px;"> <a href="http://webscan.360.cn"><img border="0" src="http://webscan.360.cn/status/pai/hash/494b6dad04e216e4d1f270ad7bfe37f4"/></a> </td> </tr> </table> <hr style=" width:1200px; height:1px;"/> If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长) <hr style=" width:1200px; height:1px;"/> <table> <tr> <td><img src="../../images/mmqrcode1435163607101.png" alt=""/></td> <td></td> <td><img src="../../images/mmqrcode1435163324094.png" alt=""/></td> </tr> <tr> <td align="right"> Copyright ©2011-</td> <td align="left"><div id="yearTime"></div> </td> <td align="left"> uuhomepage.com, Inc. All rights reserved. </td> <td> <div><script language="JavaScript" src="../../js/guanggao6.js" type="text/javascript"></script></div> </td> </tr> </table> </div> </center> </body> </html>