Which two actions should you perform?

You are developing an ASP.NET Web service.
The following code segment implements the service. (Line numbers are included for reference only.)

01 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
02 public class ProductService : System.Web.Services.WebService
03 {
04 [WebMethod]
05 public Product GetProduct(string name)
06 {
07
08 }
09
10 [WebMethod]
11 public Product GetProduct(int id)
12 {
13
14 }
15 }

You need to ensure that both GetProduct methods can be called from a Web client.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

You are developing an ASP.NET Web service.
The following code segment implements the service. (Line numbers are included for reference only.)

01 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
02 public class ProductService : System.Web.Services.WebService
03 {
04 [WebMethod]
05 public Product GetProduct(string name)
06 {
07
08 }
09
10 [WebMethod]
11 public Product GetProduct(int id)
12 {
13
14 }
15 }

You need to ensure that both GetProduct methods can be called from a Web client.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

A.
Remove line 01.

B.
Add the static modifier on lines 05 and 11.

C.
Add the following attribute before line 10.
[SoapDocumentMethod(Action=”GetProductById”)]

D.
Modify the attribute on line 10 as follows.
[WebMethod(MessageName=”GetProductById”)]



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Varun Sapre

Varun Sapre

Ans A&D

sai

sai

pls give the explaination