单项选择题
You are developing a Windows Communication Foundation (WCF) service that contains the following operation contract.
[OperationContract]
CustomerNames GetCustomerNames();
The operation returns customer names. You need to develop a definition for the operation contract that produces XML with the following structure.
Which code segment should you use? ()。
A.
B.
C.
D.
相关考题
-
单项选择题
You are creating a client application and configuring it to call a Windows Communication Foundation (WCF) service.When the application is deployed, it will be configured to send all messages to a WCF routing service. You need to ensure that the application can consume the target service after the application is deployed. What should you do?()
A. In the client application, add a service reference to the router service. In the client binding configuration, specify the address of the router service.
B. In the client application, add a service reference to the target service. In the client binding configuration, specify the address of the target service.
C. In the client application, add a service reference to the router service. In the client binding configuration, specify the address of the target service.
D. In the client application, add a service reference to the target service. In the client binding configuration, specify the address of the router service. -
多项选择题
You develop a Windows Communication Foundation (WCF) service to generate reports. Client applications call the service to initiate report generation but do not wait for the reports to be generated. The service does not provide any status to the client applications. The service class is defined as follows. (Line numbers are included for reference only.) 01 [ServiceContract] 02 public class ReportGeneratorService 03 { 04 ... 05 private int GenerateReports(int clientID) 06 { 07 ... 08 return 0; 09 } 10 } You need to ensure that client applications can initiate reports without waiting for status. Which two actions should you perform (Each correct answer presents part of the solution. Choose two.) ()。
A. Insert the following code at line 04. [OperationContract(IsOneWay=true)]
B. Insert the following code at line 04. [OperationContract(AsyncPattern=false)]
C. At line 05, change the GenerateReports method from private to public.
D. Remove line 08. At line 05, change the return type of GenerateReports method to void. -
单项选择题
Your company has a Windows Communication Foundation (WCF) service at the URL http://services.contoso.com/OrderLookupService.svc.The section of the configuration file is as follows. (Line numbers are included for reference only.)01 02 03 04 05 06 ...0708 09 10 11 You need to ensure that the service publishes the WSDL description at http://services.contoso.com/OrderLookupService.svc?wsdl. What should you do?()
A.
B.
C.
D.
