PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

How can this be achieved?

DRAG DROP
There is a WCF (Windows Communication Foundation) service PassGuideService.
PassGuideService is configured to accept messages that are encrypted and signed.
There is a client PassGuideClient that is using PassGuideService.
PassGuideClient is not working well. It is not receiving proper responses from PassGuideService.
To troubleshoot this problem you need to verify that the messages from PassGuideClient are
encrypted and signed. You would need to enable logging.
Furthermore, you need to check the content of each message body before it is deserialized to a
.NET object.
How can this be achieved?

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:
public class GreetingService IGreetingService
{
public string GetMessage()
{
INameService clientChannel OperationContext Current.GetCallbac kChannel
<INameService>;
using clientName = clientChanne[GetName()];
return String.Format(“Hi there {0}, clientName);
}}
Hosting code exhibit:
ServiceHost host = new ServiceHost(typeof(GreetingService));
NetTcpBinding binding = new NetTcpBinding(SecurityMode.None);
host Add ServiceEndpoint(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;
}}
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?

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:
public class GreetingService IGreetingService
{
public string GetMessage()
{
INameService clientChannel OperationContext Current.GetCallbac kChannel
<INameService>;
using clientName = clientChanne[GetName()];
return String.Format(“Hi there {0}, clientName);
}}

Hosting code exhibit:
ServiceHost host = new ServiceHost(typeof(GreetingService));
NetTcpBinding binding = new NetTcpBinding(SecurityMode.None);
host Add ServiceEndpoint(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;
}}
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…

How should this be achieved?

Contract exhibit:
[ServiceContract(Namespaces”http://PassGuide.com”)]
public interface IShipping {
[OperationContract] string PassGuideWork(int id);
}
There is a WCF (Windows Communication Foundation) application PassGuideApp.
There is a WCF (Windows Communication Foundation) service PassGuideService.
The contract of PassGuideService is being displayed in the exhibit.
PassGuideApp is also hosting other services.
PassGuideApp endpoints use SOAP 1.2 bindings with WS-Addressing 1.0.
There is one single lister configured in System.ServiceModel.MessageLogging trace source of the
system.diagnostics configuration section.
Only the messeages that the PassGuideWork operation returns should be logged.
How should this be achieved? Select four.

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) {
}
}
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?

How can this be achieved?

DRAG DROP
Data contract Exhibit:
[DataContract]
public class Employee
{
[DataMember]
public string Name,
[DataMember]

public string City:
[DataMember]
public mnt Wage;
[DataMember]
public int EMPLOYEEID;
}
XML exhibit:
<Employee>
<Name xsi:nil”true”/>
<City xsi:nil “true”/>
< EMPLOYEEID >123456789 </ EMPLOYEEID >
</Employee>
There is WCF (Windows Communication Foundation) application PassGuideApp.
PassGuideApp uses the data contract being displayed data contract exhibit.
The XML code in the XML exhibit must be produces with the data contract is serialized.
How can this be achieved?