70-513 · Question #213
You are developing an application to update a user s social status. You need to consume the service using Windows Communication Foundation (WCF). The client configuration is as follows…
The correct answer is B. Using factory As ChannelFactory(Of ISocialStatus) =. See the full explanation below for the reasoning.
Question
You are developing an application to update a user s 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" contract="ISocialStatus" name="SocialClient" /> </client> </system.serviceModel> The service contract is defined as follows. <ServiceContract()> Public Interface ISocialStatus <OperationContract()> <WebInvoke(UriTemplate:="/statuses/update.xmlstatus={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
(42 responses)- A2% (1)
- B76% (32)
- C7% (3)
- D14% (6)
Community Discussion
No community discussion yet for this question.