You are creating a Windows-based application that allows users to store photographs remotely by using a Web service.
Both the Web service and the application are configured to use Web Services Enhancements (WSE) 3.0.
You need to configure the application to ensure that a photograph can be sent to the Web service.
What should you do?
A.
Write the following code segment in the application.
ImageServiceWse serviceProxy = new ImageServiceWse();
byte[] img = GetImageBytes();
serviceProxy.RequestSoapContext.Add(imageName, img);
serviceProxy.SaveImage(null, imageName);
B.
Write the following code segment in the application.
ImageServiceWse serviceProxy = new ImageServiceWse();
byte[] img = GetImageBytes();
serviceProxy.SaveImage(img, imageName);
C.
Write the following code segment in the application.
ImageService serviceProxy = new ImageService();
serviceProxy.SoapVersion = SoapProtocolVersion.Soap12;
byte[] img = GetImageBytes();
serviceProxy.SaveImage(img, imageName);
D.
Write the following code segment in the application.
ImageService serviceProxy = new ImageService();
serviceProxy.UserAgent = “Microsoft WSE 3.0”;
byte[] img = GetImageBytes();
serviceProxy.SaveImage(img, imageName);