1.
You are creating a Windows Communication Foundation (WCF) service. You do not want to expose the internal implementation at the service layer. You need to expose the following class as a service named Arithmetic with an operation named Sum.
Public Class Calculator
Public Function Add(ByVal x As Integer, ByVal y As Integer) As Integer
End Function
End Class

Which code segment should you use?
2.
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?
3.
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. Sub DeleteItems(ByVal id As String) You need to configure WCF to call this method when the client calls the service with the HTTP DELETE operation. What should you do?
4.
You are building a client for a Windows Communication Foundation (WCF) service. You need to create a proxy to consume this service. Which class should you use?
5.
A Windows Communication Foundation (WCF) service has a callback contract. You are developing a client application that will call this service. You must ensure that the client application can interact with the WCF service. What should you do?
 
6.
You are consuming a Windows Communication Foundation (WCF) service in an ASP.NET Web application. The service interface is defined as follows.
Public Interface ICatalog
Function RetrieveItemDescription(ByVal id As Integer) As String End Interface
The service is hosted at /Catalog.svc. You need to call the service using jQuery to retrieve the description of an item as indicated by a variable named itemId. Which code segment should you use?
7.
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?
8.
A Windows Communication Foundation (WCF) service has the following contract.
Public Interface IShipping
End Interface
Function DoWork(ByVal id As Integer) As String
This is one of several service contracts hosted by your application. All endpoints use SOAP 1.2 bindings with WSAddressing 1.0. The System.ServiceModel.MessageLogging trace source in the system.diagnostics configuration section is configured with one listener. You need to make sure that only the messages that are returned from the DoWork operation are logged. Which XML segment should you add to the system.serviceModel/diagnostics/messageLogging/filters configuration element?
9.
You are developing a Windows Communication Foundation (WCF) service that reads messages from a public nontransactional MSMQ queue. You need to configure the service to read messages from the faileddelivery queue. Which URI should you specify in the endpoint configuration settings of the service?
10.
A Windows Communication Foundation (WCF) service is responsible for transmitting XML documents between systems. The service has the following requirements: