What happend when we have a method inside a Web service but having no WebMethod attribute defined?

 Posted by vishalneeraj-24503 on 12/20/2013 | Category: Web Services, Remoting Interview questions | Views: 2349 | Points: 40
Answer:

If a method which is defined inside a Web-service but have not been marked as WebMethod attribute,then we can not access that method outside the application.

Actually,when we are wrting any function inside webservice,then we have to Mark Explicitly that method as WebMethod attribute,then only we can expose that method
or access that method from outside when referring Webservice in our application.

Attaching the WebMethod attribute to a Public method indicates that we want the method exposed as part of the XML Web service.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response