What should you do?

You create a service-oriented architecture (SOA) application by using Windows Communication Foundation (WCF). The application will be deployed on a Windows HPC Server 2008 cluster.
The application includes the following code segment. (Line numbers are included for reference only.)

01 [ServiceContract]
02 public interface IFinancialService
03 {
04 [OperationContract]
05 void CreateStock(Stock s);
06 }
07 [DataContract]
09 public class Stock
10 {
11 [DataMember]
12 public string Symbol { get; set; }
13 }
14 [DataMember]
16 public class IncomeStock : Stock
17 {
18 }

You need to ensure that client applications can call the CreateStock operation by passing an IncomeStock object as the parameter. What should you do?

You create a service-oriented architecture (SOA) application by using Windows Communication Foundation (WCF). The application will be deployed on a Windows HPC Server 2008 cluster.
The application includes the following code segment. (Line numbers are included for reference only.)

01 [ServiceContract]
02 public interface IFinancialService
03 {
04 [OperationContract]
05 void CreateStock(Stock s);
06 }
07 [DataContract]
09 public class Stock
10 {
11 [DataMember]
12 public string Symbol { get; set; }
13 }
14 [DataMember]
16 public class IncomeStock : Stock
17 {
18 }

You need to ensure that client applications can call the CreateStock operation by passing an IncomeStock object as the parameter. What should you do?

A.
Insert the following line of code at line 08:
[KnownType(typeof(IncomeStock))]

B.
Insert the following line of code at line 08:
[ServiceKnownType(typeof(IncomeStock))]

C.
Insert the following line of code at line 15:
[KnownType(typeof(Stock))]

D.
Insert the following line of code at line 15:
[ServiceKnownType(typeof(Stock))]



Leave a Reply 0

Your email address will not be published. Required fields are marked *