70-513 · Question #68
You are consuming a Windows Communication Foundation (WCF) service. The service interface is defined as follows: [DataContract(Namespace = ''] public class Item { } [ServiceContract(Namespace = '')]…
Sign in or unlock 70-513 to reveal the answer and full explanation for question #68. The question stem and answer options stay visible for context.
Question
You are consuming a Windows Communication Foundation (WCF) service. The service interface is defined as follows:
[DataContract(Namespace = ''] public class Item { } [ServiceContract(Namespace = '')] public interface Catalog { [OperationContract] [WebInvoke(Method="POST", UriTemplate="{Item}")] Item UpdateItem(Item item); } The client application receives a WebResponse named response with the response from the service. You need to deserialize this response into a strongly typed object representing the return value of the method. Which code segment should you use?
Options
- ADataContractSerializer s = new DataContractSerializer(typeof(Item));
- BBinaryFormatter f = new BinaryFormatter();
- CXmlDictionaryReader r = JsonReaderWriterFactory.CreateJsonReader(
- DDataContractJsonSerializer s = new DataContractJsonSerializer
Unlock 70-513 to see the answer
You've previewed enough free 70-513 questions. Unlock 70-513 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.