What should you do?

You create a Windows Communication Foundation (WCF) service to upload a large amount of input data for a protein-folding process. The service will run on a Windows HPC Server 2008 cluster. You configure the binding of the WCF service endpoint by using the following XML fragment. (Line numbers are included for reference only.)

01 <basicHttpBinding>
02 <binding name="HttpStreaming" transferMode="Streamed" />
03 </basicHttpBinding>

You plan to write a single operation named UploadProteinFoldingData. You need to ensure that data is uploaded by using the streaming transfer mode.
What should you do?

You create a Windows Communication Foundation (WCF) service to upload a large amount of input data for a protein-folding process. The service will run on a Windows HPC Server 2008 cluster. You configure the binding of the WCF service endpoint by using the following XML fragment. (Line numbers are included for reference only.)

01 <basicHttpBinding>
02 <binding name="HttpStreaming" transferMode="Streamed" />
03 </basicHttpBinding>

You plan to write a single operation named UploadProteinFoldingData. You need to ensure that data is uploaded by using the streaming transfer mode.
What should you do?

A.
Define the UploadProteinFoldingData operation contract by using the following code segment:
[OperationContract]
void UploadProteinFoldingData(string processName, byte[] data);

B.
Define the UploadProteinFoldingData operation contract by using the following code segment:
[OperationContract]
void UploadProteinFoldingData(string processName, Stream data);

C.
Define the UploadProteinFoldingData operation contract by using the following code segment:
[OperationContract]
void UploadProteinFoldingData(ProteinFoldingInputData data); Define the ProteinFoldingInputData data contract by using the following code segment:
[DataContract]
public class ProteinFoldingInputData {
[DataMember]
public string ProcessName { get; set; }
[DataMember]
public byte[] Data { get; set; }
}

D.
Define the UploadProteinFoldingData operation contract by using the following code segment:
[OperationContract]
void UploadProteinFoldingData(ProteinFoldingInputRequest data); Define the ProteinFoldingInputRequest message contract by using the following code segment:
[MessageContract]
public class ProteinFoldingInputRequest {
[MessageHeader]
public string ProcessName { get; set; }
[MessageBodyMember]
public Stream Data { get; set; }
}



Leave a Reply 0

Your email address will not be published. Required fields are marked *