单项选择题
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?()
A. Declare a wrapper namespace for the message contract by using the WrapperNamespace property of the MessageContract attribute
B. Explicitly set the Namespace property of all the MessageBodyMember attrbutes to the same namespace.
C. Declare all of the body members as properties of a DataContract class and use the class as the only body member of the message contract.
D. Declare all of the body members as properties of a separate MessageContract class and use the class as the only body member of the message contract.
相关考题
-
单项选择题
Your Windows Communication Foundation (WCF) client application uses HTTP to communicate with the service.You need to enable message logging and include all security information such as tokens and nonces in logged messages.What should you do?()
A.
B.
C.
D. -
单项选择题
You are integrating a Windows Communication Foundation (WCF) service within an enterprise-wide Service Oriented Architecture (SOA).Your service has the following service contract: [ServiceContract]public class CreditCardConfirmationService { [OperationContract] boolean ConfirmCreditCard(string ccNumber); double OrderAmount(int orderNumber);} You need to allow the code in the ConfirmCreditCard method to participate automatically in existing transactions.If there is no existing transaction, a new transaction must be created automatically. What should you do?()
A. Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new TransactionScope()) block.
B. Inside the ConfirmCreditCard method, surround the code that must participate in the transaction with a using(new CommittableTransaction()) block.
C. Add an [OperationBehavior(TransactionScopeRequired=true)] attribute to the ConfirmCreditCard method.
D. Add an [OperationBehavior(TransactionAutoComplete=true)] attribute to the ConfirmCreditCard method. -
单项选择题
You are creating a Window Commnunication Foundation (WCF) service application. The application needs to service many clients and requests simultaneously. The application also needs to ensure subsequent individual client requests provide a stateful conversation. You need to configure the service to support these requirements. Which attribute should you add to the class that is implementing the service?()
A. [ServiceBehavior(lnstanceContextMode = lnstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single)]
B. [ServiceBehavior(lnstanceContextMode = lnstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Reentrant)]
C. [ServiceBehavior(InstanceContextMode = lnstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)]
D. [ServiceBehavior(lnstanceContextMode = lnstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
