PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which of the following codes should you insert at line number 06?

You are working on a WCF service that will be accessed by several clients. The service will be
used by a bank to handle financial calculations. You want to ensure that the service uses
sessions. You have written the following code segment: (Line numbers are included for reference
only.)
01 namespace MyBankService
02 {
03 [ServiceContract(Name = “BankService”,
04 Namespace = “http://www.mybankservice.com”,
05 CallbackContract = typeof(IBankService),
06 ‘ Insert code statement here.)]
07 public interface IBankService
08 {
09 [OperationContract(IsOneWay = true)]
10 int Deposit(double amount, int accountnum);
11 }
12 }
Which of the following codes should you insert at line number 06?

What should be done in the code to correct this error so that the service will compile and run properly?

You have been tasked with creating a WCF service for a hospital. This service will provide access
to patient data. You have written the following code:
using System;
using System.ServiceModel;
namespace MyHospital.PatientService
{
[ServiceContract(Namespace=”MyHospital.PatientService”)]
public interface IPatientService
{
[OperationContract]
void CheckOutPatient(int PatientID);
int FindPatientRecord(string LastName,stringFirstName);
int AddPatientRecord(string LastName,stringFirstName);
}
}
However, you are getting an error in the above code. What should be done in the code to correct
this error so that the service will compile and run properly?

you need to specify in your binding, in order to implement transactions in your WCF service 4.0? Each correct

You work as a Windows Developer for PassGuide.com. The company uses Visual Studio .NET

Framework 4.0 as its application development platform. You have been tasked to implement
transactions in your WCF service 4.0. Which of the following attributes would you need to specify
in your binding, in order to implement transactions in your WCF service 4.0?
Each correct answer represents a complete solution. Choose all that apply.

Which of the following code segments should you insert at line number 07?

You work as an Application Developer for PassGuide.com. You are tasked with creating a WCF
application for a bank. You write the following code segment: (Line numbers are for reference
only.)
01 [ServiceContract]
02 public interface IBankService
03 {
04 [OperationContract]
05 void WithdrawFunds();
06{
07
08 public class ServiceImpl : IBankService
09 {
10 [OperationBehavior(TransactionScopeRequired=true)]
11 public void WithdrawFunds() { }
12 }
You need to ensure that each service call is allowed on the service instance at a time and the
service object is released as soon as the current transaction is completed. Which of the following
code segments should you insert at line number 07?

What is the next step that he must take to accomplish the task?

John works as a Windows Application Developer for PassGuide.com. The company uses

Microsoft Visual Studio .NET 2010 as its application development platform for creating
applications. He has been given a task of creating a WCF service based on Framework 4.0. He
has finished creating the WCF service and must now configure the bindings. He requires using
WSHttpBinding binding. He has already defined and implemented the service contract on the
application. What is the next step that he must take to accomplish the task?

Which of the following bindings whould you use to accomplish the task?

You work as a Windows Developer for PassGuide.com. You have been provided with a task to
create a WCF service by using Microsoft .NET Framework 4.0. For this, you need to host the
service in a medium trust environment on a Web server. Which of the following bindings whould
you use to accomplish the task?
Each correct answer represents a complete solution. Choose two.