单项选择题
You are creating a Windows Communication Foundation (WCF) service that implements operations in a RESTful manner. You need to add a delete operation. You implement the delete method as follows:void DeleteItems(string id);You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation. What should you do?()
A. Add the WebInvoke(UriTemplate="/Items/{id}", Method="DELETE") attribute to the operation
B. Add the HttpDelete atribute to the operation
C. Replace the string parameter with a RemovedActivityAction parameter
D. Replace the return type with RemovedActivityAction.
相关考题
-
单项选择题
You are developing a client that sends several types of SOAP messages to a Windows Communication Foundation (WCF) service method named PostData. PostData is currently defined as follows:[OperationContract]void PostData(Order data);You need to modify PostData so that it can receive any SOAP message. Which code segment should you use?()
A. [OperationContract(IsOneWay=true, Action="*", ReplyAction="*")] void PostData(Order data);
B. [OperationContract(IsOneWay=true, Action="*", ReplyAction = "*")] void PostData(BodyWriter data);
C. [OperationContract] void PostData(BodyWriter data);
D. [OperationContract] void PostData(Message data); -
单项选择题
A Windows Communication Foundation (WCF) application uses a data contract that has several data members. You need the application to throw a SerializationException if any of the data members are not present when a serialized instance of the data contract is deserialized.What should you do?()
A. Add the KnownType attribute to the data contract. Set a default value in each of the data member declarations.
B. Add the KnownType attribute to the data contract. Set the Order property of each data member to unique integer value.
C. Set the EmitDefaultValue property of each data member to false.
D. Set the lsRequired property of each data member to true. -
单项选择题
You are developing a data contract for a Windows Communication Foundation (WCF) service. The data in the data contract must participate in round trips. Strict schema validity is not required. You need to ensure that the contract is forward-compatible and allows new data members to be added to it. Which interface should you implement in the data contract class?()
A.ICommunicationObject
B.IExtension
C.IExtensibleObject
D.IExtensibleDataObject
