70-513 · Question #206
You are developing an application to update a users social status. You need to consume the service using Windows Communication Foundation (WCF). The client configuration is as follows…
The correct answer is A. Using factory As WebChannelFactory(Of ISocialStatus) =. See the full explanation below for the reasoning.
Question
You are developing an application to update a users social status. You need to consume the service using Windows Communication Foundation (WCF). The client configuration is as follows. <system.serviceModel> <bindings> <webHttpBinding> <binding name="SocialConfig"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Basic" realm="Social API" /> </security> </binding> </webHttpBinding> </bindings> <client> binding="webHttpBinding" bindingConfiguration="SocialConfig" ontract="ISocialStatus" name="SocialClient" /> </client> </system.serviceModel> The service contract is defined as follows. <ServiceContract()> Public Interface ISocialStatus <OperationContract()> <WebInvoke(UriTemplate:="/statuses/update.xml?status={text}")> Sub UpdateStatus(ByVal text As String) End Interface Which code segment should you use to update the social status?
Options
- AUsing factory As WebChannelFactory(Of ISocialStatus) =
- BUsing factory As ChannelFactory(Of ISocialStatus) =
- CUsing factory As ChannelFactory(Of ISocialStatus) =
- DUsing factory As WebChannelFactory(Of ISocialStatus) =
How the community answered
(29 responses)- A76% (22)
- B14% (4)
- C3% (1)
- D7% (2)
Community Discussion
No community discussion yet for this question.