单项选择题
Your company has a Windows Communication Foundation (WCF) service at the URL http://services.contoso.com/OrderLookupService.svc.The
What should you do?()
A.
B.
C.
D.
相关考题
-
单项选择题
You are developing a Windows Communication Foundation (WCF) service. The service operation takes a customer number as the only argument and returns information about the customer. The service requires a security token in the header of the message. You need to create a message contract for the service. Which code segment should you use?()
A.
B.
C.
D. -
单项选择题
You are developing a client application that consumes a Windows Communication Foundation (WCF) service. You use the svcutil.exe utility to create a proxy for the service. You use the svcutil.exe switches that generate asynchronous calls. GetFlight is a service operation that takes no parameters and returns a string. The GetFlightCallback method must be called when the service operation returns.You create an instance of the client proxy with the following code:var client = new TranvelServiceClient();You need to ensure that a callback is received when the GetFlight operation is called asynchronously. Which code segment should you use?()
A. client.BeginGetFlight(GetFlightCallback, null); client.GetFlight();
B. client.GetFlight(); client.BeginGetFlight(GetFlightCallback, null);
C. client.GetFlightCompleted += new EventHandler(GetFlightCallback); client.GetFlightAsync();
D. IAsyncResult asyncResult = client.BeginGetFlight(GetFlightCallback, client); client.EndGetFlight(asyncResult); -
单项选择题
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");
