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…
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…
you need to tweak the performance of PassGuideService so it allows the maximum number calls the methods
DRAG DROP
Exhibit:
<ServiceContract>
<ServiceBehavior(ConcurrencyMode =
ConcurrencyMode.Multiple)>
Public class DataAccessService
<OperationContract>
Public Function PutMessage(ByVal message As String)
MessageDatabase.PutMessage(message)
<OperationContract>
Public Function SearchMessages(ByVal search As String) as String
Return MessageDatabase.SearchMessages(search)
End Function
End Class
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService is specified in the exhibit.
PassGuideService is used over a TCP binding.
At the moment MessageDatabase only support a small finite number of concurrent executions of
the methods belonging to it.
While not preventing users to connecting to PassGuideService you need to tweak the
performance of PassGuideService so it allows the maximum number calls the methods.
What should be done?
Which code should be used?
DRAG DROP
Exhibit:
<ServiceContract>
PuElic Interface ITeamMessageService
<OperationContract>
Function GetMessage() As String
<OperationContract>
Sub PutMessage(Byval message As String)
End Interface
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService uses the contract being displayed in the exhibit.
PassGuideService is used to share messages between the clients.
You need to ensure that all the clients receive the same message from the GetMessage method,
even if the PutMessage method is used by another client.
Which code should be used?
Which code should you use?
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?
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 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.