what is web method attribute in web service?

不羁的心 提交于 2019-12-07 00:05:27

WebMethod indicates "the method exposed as part of the XML Web service."
ScriptMethod "Specifies which HTTP verb is used to invoke a method, and the format of the response"

WebMethod attribute identifies this method as a web service method.

The ScriptMethodAttribute attribute is optional.

If a method is not marked with ScriptMethodAttribute, the method will be called by using the HTTP POST command and the response will be serialized as JSON. You cannot override this setting from script.

The WebMethod attribute enables the method to be called through the web service.

The ScriptMethod attribute tells which method should be used to call the method (POST/GET) and with formatting the response should use (JSON or XML)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!