.NET 重载 WebMethods - 可能吗?
我有两个希望重载的 Web 方法:
<WebMethod()> _
Public Function GetProject(ByVal id As Int32) As Project
<WebMethod(MessageName:="GetProjects")> _
Public Function GetProject(ByVal filter As String) As Projects
我读到了有关使用 MessageName 重载的信息,但是我无法让它工作。这可能吗?
I have two web methods which I wish to overload:
<WebMethod()> _
Public Function GetProject(ByVal id As Int32) As Project
<WebMethod(MessageName:="GetProjects")> _
Public Function GetProject(ByVal filter As String) As Projects
I read about overloading using MessageName, however I cannot get this to work. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当然有可能!
不要忘记更改 WebServiceBinding
[WebServiceBinding(ConformsTo = WsiProfiles.None)]
试试这个:
Off course it is possible!
do not forget to change the WebServiceBinding
[WebServiceBinding(ConformsTo = WsiProfiles.None)]
try this:
是的,这应该是可能的。
希望此链接会有所帮助:http://forums.asp.net/t/1162934.aspx
Yes, it should be possible.
Hope this link will help: http://forums.asp.net/t/1162934.aspx