ASP .NET Web service 如何工作,ASP.NETW,SP.NETWe,P.NETWeb,.NETWebs,NETWebse,ETWebser,TWebserv,Webservi,ebservic,bservice,service,ervicea,rviceam,viceamp,iceamp,ceamp#,eamp#2,amp#22,amp#229,mp#2291,p#22914,#22914,#22914,22914a,2914am,914amp,14amp,4amp#, ASP .NET Web service 如何工作----编程资料集中营--八角123--bajiao123.com
编程资料集中营
 | 网站首页 | 文章中心 | 编程资料2 | 软件下载 | BT下载 | 八卦星闻 | 音乐在线 | 在线游戏 | 免费电影 | 进入问吧 | 
ASP .NET Web service 如何工作,Summary:SeehowMicrosoftASP.NETWebservicesmethods(WebMethods)provideahigh-productivityapproachtobuildingWebservices.WebMethodscanexposetraditionalMicrosoft.NETmethodsasWebserviceope,
您现在的位置: 编程资料,学习资料,c,c++,vc,vc++,java,jsp,j2ee,j2me,asp,php >> 文章中心 >> .NET 专区 >> NET 技术 >> 文章正文
【字体:
ASP .NET Web service 如何工作   进入问吧

本站地址:http://www.bajiao123.com

作者:admin    文章来源:本站    点击数:    更新时间:2007-6-7    

ASP .NET Web service 如何工作

Summary: See how Microsoft ASP.NET Web services methods (WebMethods) provide a high-productivity approach to building Web services. WebMethods can expose traditional Microsoft .NET methods as Web service operations that support HTTP, XML, XML Schema, SOAP, and WSDL. The WebMethod (.asmx) handler automatically dispatches incoming SOAP messages to the appropriate method and automatically serializes the incoming XML elements into corresponding .NET objects. (20 printed pages)

Contents

Introduction
WebMethods Framework
Message Dispatching
Mapping XML to Objects
Automatic WSDL Generation
Conclusion
Resources

Introduction

There are two fundamentally different ways to implement HTTP-based Web services in Microsoft?.NET today. The first and lowest-level technique is to write a custom IHttpHandler class that plugs into the .NET HTTP pipeline. This approach requires you to use the System.Web APIs to process the incoming HTTP message along with the System.Xml APIs to process the SOAP envelope found in the HTTP body. Writing a custom handler also requires you to manually author a WSDL document that accurately describes your implementation. Doing all of this properly requires a solid understanding of the XML, XSD, SOAP, and WSDL specifications, which is a daunting prerequisite for most.

A more productive way to implement Web services is to use the Microsoft ASP.NET WebMethods framework. ASP.NET ships with a special IHttpHandler class for .asmx endpoints (called WebServiceHandler), which provides the boilerplate XML, XSD, SOAP, and WSDL functionality that you need. Since the WebMethods framework shields you from the complexities of the underlying XML technologies, you´re able to quickly focus on the business problem at hand.

Figure 1. Tradeoff between flexibility and productivity

Choosing between implementation techniques comes down to the common tradeoff between flexibility and productivity as shown in Figure 1. Writing a custom IHttpHandler gives you unbounded flexibility, but it´s also going to take you longer to write, test, and debug the code. The WebMethods framework makes it easy to get your Web services up and running quickly, but you´re obviously restricted to the boundaries of the framework. However, in cases where the WebMethods framework doesn´t provide exactly what you need, it´s possible to extend the framework by adding additional functionality of your own.

In general, unless you´ve mastered XML, XSD, SOAP, and WSDL and are willing to take on the burden of dealing with them directly, you´re better off sticking with the WebMethods framework for your Web services needs. It provides the basic services that most Web service endpoints require along with some interesting extensibility po

[1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

   

进入问吧

本站地址:http://www.bajiao123.com

文章录入:admin    责任编辑:admin 
高级搜索
编程资料集中营