PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

How can this be achieved?

DRAG DROP
PassGuideService Exhibit:
<ServiceContract>
Public Interface PassGuideService
<OperationContract>
Function GetPassGuideServiceTime() As DateTime
End Interface
There is a class PassGuideService.
PassGuideService is hosted within an ASP.NET application PassGuideApp.
PassGuideService implements the interface being displayed in the exhibit.
PassGuideApp must be tweaked so that the GetPassGuideServiceTime method returns the result
formatted as JSON when request url ends in /PassGuide.
How can this be achieved?

How should the ServiceContract be tweaked to achieve is?

ServiceContract Exhibit:
<ServiceContract>
Public Class PassGuideService
<OperationContract>
Public Function PassGuideConfirm(ByVal PhoneNumber As String,ByVal wage As Double,ByVal
EmployeeNumber Integer) As Boolean ‘…
End Function
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService exists within SOA (Service Oriented Architecture) within an enterprise.
The serviceContact of PassGuideService is displayed in the exhibit.
Method PassGuideConfirm, when executed, must be participate transperentally in existing
transactions.Furthermore, when there is no existing transaction, a new transaction must be
created.
How should the ServiceContract be tweaked to achieve is?

You need to tweak the code in order to make it work

Contract exhibit:
[ServiceContract(CallbackContract typeof(INameService))]
public interface IGreetingSennce
{
[OperationContract]
string GetMessage0,
}
[ServiceContract]
public interface INameService

{
[OperationContract]
string GetName();
}
IGreetingService interface exhibit:
<ServiceContract(CallbackContract typeof(INameService))>
Public Interface IGreetingService
<OperationContract>
Function GetMessage() As String
End Interface
<ServiceContract>
Public Interface INameService
<OperationContract>
Function GetNamne() As String
End Interface
Hosting code exhibit:
Dim host As ServiceHost =
New ServiceHost(GetType(GreetingService))
Dim binding As NetTcpBinding =
New NetTc pBindng(SecurityMode.None)
Host.AddServiceEndpoint(“PassGuideAppIGreetingService”,
binding, net.tcp:localhost = “96374″)
Host Open()
INameService interface exhibit:

class NameService INameService
{
string name;
public NameService(string name)
{
this.name = name;
}
public string GetName()
{
return name;
}}
Class NameService
Implements INameService
Dim name As String
Public Sub NameService(ByV name As String)
Me.reme = name
End Sub
Public Function GetName() As String -Impements INameService. GeNamee
Return name
End Function
End Class
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService is self-hosted.
The implementations of contracts, the IGreetingService interface, the hosting code, and the
INameService interface are all being displayed in the exhibits.

At the moment the above code fails at line “return String.Format(“Hi there {0}, clientName);”.
You need to tweak the code in order to make it work.
What should you do? (select three)
Use code…

Which contract should PassGuideService have?

DRAG DROP
There is a WCF (Windows Communication Foundation) service PassGuideService.
The clients and the service that uses PassGuideService use NetTcpBinding (transaction flow
enabled).
Assuming that the operations PassGuideOP1 and PassGuideOP2 are called within the same
client session, you need to enforce that they are executed within the same transaction context.
Which contract should PassGuideService have?

Which attribute should be added to the class implementation?

DRAG DROP
There is a WCF (Windows Communication Foundation) service application PassGuideApp.
PassGuideApp is required to provide service to a heavy client request load, even simulatanous
requests. Stateful conversation must be provided for each ensure subsequent individual client request.
Which attribute should be added to the class implementation?

You need to tweak the code in order to make it work

Contract exhibit:
[ServiceContract(CallbackContract typeof(INameService))]
public interface IGreetingSennce
{
[OperationContract]
string GetMessage0,
}
[ServiceContract]
public interface INameService
{
[OperationContract]
string GetName();

}
IGreetingService interface exhibit:
<ServiceContract(CallbackContract typeof(INameService))>
Public Interface IGreetingService
<OperationContract>
Function GetMessage() As String
End Interface
<ServiceContract>
Public Interface INameService
<OperationContract>
Function GetNamne() As String
End Interface
Hosting code exhibit:
Dim host As ServiceHost =
New ServiceHost(GetType(GreetingService))
Dim binding As NetTcpBinding =
New NetTc pBindng(SecurityMode.None)
Host.AddServiceEndpoint(“PassGuideAppIGreetingService”,
binding, net.tcp:localhost = “96374″)
Host Open()
INameService interface exhibit:
class NameService INameService
{
string name;

public NameService(string name)
{
this.name = name;
}
public string GetName()
{
return name;
}}
Class NameService
Implements INameService
Dim name As String
Public Sub NameService(ByV name As String)
Me.reme = name
End Sub
Public Function GetName() As String -Impements INameService. GeNamee
Return name
End Function
End Class
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService is self-hosted.
The implementations of contracts, the IGreetingService interface, the hosting code, and the
INameService interface are all being displayed in the exhibits.
At the moment the above code fails at line “return String.Format(“Hi there {0}, clientName);”.
You need to tweak the code in order to make it work.
What should you do? (select three)

Use code…

Which of the following are NOT the attributes you would set?

You work as an Application Developer for PassGuide.com. The company uses Visual Studio .NET
Framework 3.5 as its application development platform. You have decided to implement
transactions in your WCF service. You wish to implement transactions in your binding settings.
Which of the following are NOT the attributes you would set?
Each correct answer represents a complete solution. Choose two.

Which interface should be used for PassGuideContract class?

DRAG DROP
There is WCF (Windows Communication Foundation) service PassGuideService.
A data contract PassGuideContract for PassGuideService is being implemented.
PassGuideContract must be forward-compatible.
The round trips must include the information in PassGuideContract.
It should be able to add ew data members to PassGuideContract.
You do have to follow a strict schema validitiy.
Which interface should be used for PassGuideContract class?

Which code should be used?

DRAG DROP
Exhibit:
public class Machine {
public int Multiply(int x, nty) {
}
}
Public Class Calculator
Public Function Add(ByVal x As Integer,
ByVal yAs Integer) As Integer
End Function
End Class
There is WCF (Windows Communication Foundation) service which is being implemented.

You use the class displayed in the exhibit.
The class must be exposed as a service named PassGuideA and operation OperationX.
The internal implementation at the service layer should not be exposed.
Which code should be used?