开发者

difference between soap web service and webservice

开发者 https://www.devze.com 2022-12-24 05:48 出处:网络
i saw that in asp.net .asmx file, we create webservices [webmethod] //method definition here now for soap webservice

i saw that in asp.net .asmx file, we create webservices

[webmethod]
//method definition here

now for soap webservice

[webmethod]
[SoapHeader(some parameters here)]
//method defination here

my question is what's the difference betw开发者_Python百科een both webservices type and how to choose which service type to choose


There really isn't. A standard webmethod is still transported using soap. The second one just has a custom SoapHeader attached to it. This is commonly used when using authorization to perform access control to the webservice or to post special header information along with the standard service request.

Try this as an example: http://www.codeproject.com/KB/cpp/authforwebservices.aspx


You could be confusing what you've heard about WCF and ASMX web services. Microsoft considers ASMX services to be "legacy technology", anad say that all new web service development should be done using WCF.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号