Question 61


1.2.2 Question

Multiple Choices

How could you traditionally consume an ASMX web service from your application? (Choose all that apply.)

  • A. Generate a proxy by selecting Add Reference In Visual Studio.
  • B. Create an HttpService and connect using Get(URL).
  • C. Generate a proxy by selecting Add A Service Reference in Visual Studio.
  • D. Create a WCF proxy class.

Answer:

BC
Explanation

ASMX was the old way of pconsuming web services. This has now been replaced with WCF and Web API

A. Incorrect: Selecting Add Reference does not enable you to create a proxy.
B. Correct: HttpService.Get gets the output of a REST service.
C. Correct: Visual Studio creates a proxy for you from the WSDL at the site you select.
D. Incorrect: A WCF proxy class needs endpoints and bindings. REST services do not use, nor understand, WCF endpoints and bindings.