nerdexam
Microsoft

70-513 · Question #329

You are consuming a Windows Communication Foundation (WCF) service in an ASP. NET Web application. The service interface is defined as follows: [ServiceContract] public interface ICatalog {…

The correct answer is B. $get(String.format("/Catalogsvc/Catalog/Items/{0}", itemId), null. See the full explanation below for the reasoning.

Question

You are consuming a Windows Communication Foundation (WCF) service in an ASP. NET Web application. The service interface is defined as follows:

[ServiceContract] public interface ICatalog { [OperationContract] [WebGet(UriTemplate="/Catalog/Items/{id}", ResponseFormat=WebMessageFormat.Json)] string RetrieveItemDescription(int id); } The service is hosted at Catalogsvc. You need to call the service using jQuery to retrieve the description of an item as indicated by a variable named itemId. Which code segment should you use?

Options

  • A$get(String.format("/Catalogsvc/Catalog/Items/id{0}", itemId) null,
  • B$get(String.format("/Catalogsvc/Catalog/Items/{0}", itemId), null,
  • C$get(String.format("/Catalogsvc/Catalog/Items/{0}", itemld), null,
  • D$get(String.format("/Catalogsvc/Catalog/Items/id{0}", itemld), null,

How the community answered

(23 responses)
  • A
    9% (2)
  • B
    74% (17)
  • C
    4% (1)
  • D
    13% (3)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice