Microsoft
98-361 · Question #280
You create an ASP.NET Web Service that tracks the shipment of orders. The Web service includes a class nemed StatusService, which contains the following method: Public string GetStatus() { /…
The correct answer is D. You must mark the method with the WebMethod attribute. See the full explanation below for the reasoning.
Question
You create an ASP.NET Web Service that tracks the shipment of orders. The Web service includes a class nemed StatusService, which contains the following method:
Public string GetStatus() { /* additional code here */ } You note that you can instantiate the StatusService class from a Web service client project, but the GetStatus method is not available. What could be the problem?
Options
- AOnly properties can be part of the public interface of a Web service.
- BYou must mark the method with the WebService attribute.
- CThe methods of a Web service can return only object data.
- DYou must mark the method with the WebMethod attribute.
How the community answered
(20 responses)- A5% (1)
- B15% (3)
- C10% (2)
- D70% (14)
Community Discussion
No community discussion yet for this question.