nerdexam
Microsoft

70-515 · Question #171

You are developing a WCF service. The service includes an operation names GetProduct. You need to ensure that GetProduct will accept a POST request and will indicate that the returned data is XML…

The correct answer is C. Add the WebInvoke attribute to the service contract. D. Set WebOperationContext.Current.OutgoingResponse.ContentType to "text/xml" in the. See the full explanation below for the reasoning.

Question

You are developing a WCF service. The service includes an operation names GetProduct. You need to ensure that GetProduct will accept a POST request and will indicate that the returned data is XML. Which two actions should you perform (Choose 2)

Options

  • AAdd the WebGet attribute to the service contract.
  • BSet WebOperationContext.Current.OutgoingRequest.ContentType to "text/xml" in the
  • CAdd the WebInvoke attribute to the service contract.
  • DSet WebOperationContext.Current.OutgoingResponse.ContentType to "text/xml" in the

How the community answered

(28 responses)
  • A
    18% (5)
  • B
    11% (3)
  • C
    71% (20)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice