You are developing a WCF service.
You need to create a duplex contract.
What should you do? (Each correct answer presents part of the solution. Choose all that apply.)
A.
Apply the MessageContractAttribute attribute to every public method signature included in the
appropriate contract.
B.
Create an interface for the client-side duplex contract.
C.
Create an interface for the server-side duplex contract.
D.
Apply the MessageContractAttribute attribute to the appropriate interface.
E.
Apply the ServiceContractAttribute attribute to the appropriate interface. Then, apply the
OperationContractAttribute attribute to every public method signature included in that contract.
F.
Set the CallbackContract property to the appropriate interface.
Explanation:
To create a duplex contract
1. (C) Create the interface that makes up the server side of the duplex contract.
2. (E) Apply the ServiceContractAttribute class to the interface.
3. Declare the method signatures in the interface.
4. (E) Apply the OperationContractAttribute class to each method signature that must be part of
the public contract.
5. Create the callback interface that defines the set of operations that the service can invoke on
the client.
6. Declare the method signatures in the callback interface.
7. Apply the OperationContractAttribute class to each method signature that must be part of the
public contract.
8. (F) Link the two interfaces into a duplex contract by setting the CallbackContract property in the
primary interface to the type of the callback interface.How to: Create a Duplex Contract
Is this exam about Microsoft Azure? It was few questions about Azure technology. Other(most) questions was about Web Api, MVC, Entity Framework, WCF.
It has web services in the title, so ¯\_(ツ)_/¯. As for me, this exam doesn’t test knowledge of those technologies…
C , E & F
https://msdn.microsoft.com/en-us/library/ms731184(v=vs.110).aspx
Why not CEBF? We need to create an interface for the client operations and this interface shall be indicated by CallbackContrackt property?
Hm, it is one of possible ways. But, you could autogenerate the interface using add service reference or use shared lib between server and client with that interface. that is why I hate these questions – often there are more than one valid answers.
https://msdn.microsoft.com/en-us/library/ms731184(v=vs.110).aspx