nerdexam
Microsoft

70-513 · Question #293

A Windows Communication Foundation (WCF) service is generating a separate namespace declaration for each body member of a message contract, even though all body members share the same namespace. You…

The correct answer is C. Declare all of the body members as properties of a DataContract class and use the class as. See the full explanation below for the reasoning.

Question

A Windows Communication Foundation (WCF) service is generating a separate namespace declaration for each body member of a message contract, even though all body members share the same namespace. You need to simplify the XML representation of your message contract so that the namespace is only declared once. What should you do?

Options

  • ADeclare a wrapper namespace for the message contract by using the WrapperNamespace
  • BExplicitly set the Namespace property of all the MessageBodyMember attrbutes to the same
  • CDeclare all of the body members as properties of a DataContract class and use the class as
  • DDeclare all of the body members as properties of a separate MessageContract class and use

How the community answered

(53 responses)
  • A
    13% (7)
  • B
    6% (3)
  • C
    79% (42)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice