微软认证考试

You are developing a client that sends several types of SOAP messages to a Windows Communication Foundation (WCF) service method named PostData. PostData is currently defined as follows:[OperationContract]void PostData(Order data);You need to modify PostD

题目

You are developing a client that sends several types of SOAP messages to a Windows Communication Foundation (WCF) service method named PostData. PostData is currently defined as follows:[OperationContract]void PostData(Order data);You need to modify PostData so that it can receive any SOAP message. Which code segment should you use?()

  • A、[OperationContract(IsOneWay=true, Action="*", ReplyAction="*")] void PostData(Order data);
  • B、[OperationContract(IsOneWay=true, Action="*", ReplyAction = "*")] void PostData(BodyWriter data);
  • C、[OperationContract] void PostData(BodyWriter data);
  • D、[OperationContract] void PostData(Message data);
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are developing a client application that consumes a Windows Communication Foundation (WCF) service.The operation contract is as follows.[OperationContract][FaultContract(typeof(SalesFault))]string GetSales(string saleId);()The service configuration file contains the following line in the serviceBehaviors section.A divide-by-zero exception is not being handled by the service.You need to ensure that the exception is caught in the client application.Which type of exception should the client catch?()

A. TimeoutException

B. FaultException

C. DivideByZeroException

D. FaultException<SalesFault>


参考答案:B

第2题:

You are developing a client application that uses the following code to consume a Windows Communication Foundation (WCF) service.(Line numbers are included for reference only.)01 BasicHttpBinding myBinding = new BasicHttpBinding();02 EndpointAddress myEndpointAddress = new EndpointAddress("http://contoso.com/TaxService.svc");03 ...04 ITaxService client = channelFactory.CreateChannel();05 string data = client.GetData(1);You need to consume the service.Which code segment should you insert at line 03?()

A. var channelFactory = new ChannelFactory();

B. var channelFactory = new ChannelFactory(myBinding);

C. var channelFactory = new ChannelFactory(myBinding, myEndpointAddress);

D. var channelFactory = new ChannelFactory("http://contoso.com/TaxService.svc");


参考答案:C

第3题:

You are developing a Windows Communication Foundation (WCF) service.You enable message logging, trace listeners, activity propagation, and tracing on the trace sources.You have the following code segment in the client application. (Line numbers are included for reference only.)01 Guid multiCallActivityId = Guid.NewGuid();02 TraceSource ts = new TraceSource("Multicall");03 Trace.CorrelationManager.ActivityId = multiCallActivityId;04You encounter errors when your client application consumes the service.You need to ensure that your client application can correlate tracing information with the service.Which code segment should you add at line 04?()

A.

B.

C.

D.


参考答案:C

第4题:

You work as an application developer at Certkiller .com. Certkiller .com wants you to develop an application that stores and retrieves client information by means of a unique account number.You create a custom collection class, which implements the IDictionary interface,named ClientDictionary. The following code have been included into the new application. //Create Client objects Client c1 = new Client ("AReid", "Andy Reid", Status.Current); Client c2 = new Client ("DAustin", "Dean Austin", Status.New); //Create ClientDictionary object IDictionary cData = new ClientDictionary (); cData.Add ("10001", c1); cData.Add ("10002", c2); You use the same method to add other Client objects to the collection. You need to ensure that you are able to retrieve client information associated with the account number 10111.What should you do?()

  • A、 Use the following code: Client foundClient;foundClient = (Client) cData.Find ("10111"); 
  • B、 Use the following code: Client foundClient;if (cData.Contains ("10111")) foundClient = cData ["10111"]; 
  • C、 Use the following code: Client foundClient;if (cData.Contains ("10111"))foundClient =(Client) cData ["10111"]; 
  • D、 Use the following code: Client foundClient;foreach (string key in cData.Keys {if (key == "10111")foundClient = (Client) cData.Values ["10111"]; }

正确答案:C

第5题:

Which statement is correct about defining an Infranet Enforcer for use as a RADIUS Client? ()

  • A、You do not need to configure a RADIUS client policy.
  • B、You must know the exact model number of the Infranet Enforcer.
  • C、You must specify the NACN password of the device in the RADIUS client policy.
  • D、You do not need to designate a location group to which the Infranet Enforcer will belong.

正确答案:A

第6题:

You are developing a new version of an existing message contract named CustomerDetailsVersion1. The new version of the message contract must add a Department field of type String to the SOAP header.You create a new class named CustomerDetailsVersion2 that inherits from CustomerDetailsVersion1. You need to ensure that all client applications can consume the service.Which code segment should you use?()

A.

B.

C.

D.


参考答案:A

第7题:

You want to debug the Windows Communication Foundation (WCF) client and server interaction through message and application tracing.You need to correlate traces generated on the client and the server. Which XML segment should you add to the system.diagnostics configuration element in the client and server application configuration file?()

A.

B.

C.

D.


参考答案:A

第8题:

You are developing a Windows Communication Foundation (WCF) service. Client applications require reliable sessions to access the service.Users report that they receive ServerTooBusyException errors when their client application tries to establish a session. You need to ensure that the service can handle a minimum of 30 client connection requests.Which ReliableSessionBindingElement property should you configure?()

A. MaxRetryCount

B. MaxTransferWindowSize

C. MaxPendingChannels

D. InactivityTimeout


参考答案:C

第9题:

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? ()

  • A、 On the OperationContractAttribute, set the AsyncPattern property value to True.
  • B、 On the OperationContractAttribute, set the ReplyAction property value to the endpoint address of the client. For interactive and self-paced preparation of exam 70-513, try our practice exams. Practice exams also include self assessment and reporting features!
  • C、 On the client, create a proxy derived from DuplexClientBase(Of TChannel).
  • D、 On the client, use GetCallbackChannel(Of T).

正确答案:C

第10题:

You are developing a client application that uses the following code to consume a Windows Communication Foundation (WCF) service.(Line numbers are included for reference only.) 01 BasicHttpBinding myBinding = new BasicHttpBinding( ); 02 EndpointAddress myEndpointAddress = new EndpointAddress("http://contoso.com/TaxService.svc"); 03 ... 04 ITaxService client = channelFactory.CreateChannel( ); 05 string data = client.GetData(1); You need to consume the service. Which code segment should you insert at line 03?()

  • A、var channelFactory = new ChannelFactory();
  • B、var channelFactory = new ChannelFactory(myBinding);
  • C、var channelFactory = new ChannelFactory(myBinding, myEndpointAddress);
  • D、var channelFactory = new ChannelFactory("http://contoso.com/TaxService.svc");

正确答案:C

更多相关问题