PrepAway - Latest Free Exam Questions & Answers

Category: 70-513

Exam 70-513: TS: Windows Communication Foundation Development with Microsoft .NET Framework 4

Which code segment should you use?

You are developing a Windows Communication Foundation (WCF) service that contains the following code segment.

[ServiceContract]
public interface ICustomerService
{

}
public class CustomerService : ICustomerService
{

}

The service is self-hosted in a console application. Older client applications access the service at http://contoso.com:8080/CustomerService/V1.
Newer client applications access the service at http://contoso.com:8080/CustomerService/V2.
You need to ensure that any client application can access the service at either address. Which code segment should you use?

What should you do?

Your company has an existing Windows Communication Foundation (WCF) service that allows business partners to place orders.
The service uses netMsmqBinding. You find that processing every order in its own transaction is causing a delay.
You need to ensure that the service is configured to process multiple orders in one transaction. What should you do?

Which scopes should you add to the client configuration file?

You create a service and deploy it on a network in a building named Building1. You will deploy the service to Building2.

The service in Building1 is configured using the following discovery scopes.
<scopes>
<add scope=”http://contoso.com/Chicago/Building1″/>
<add scope=”ldap:///ou=Building1,ou=Chicago,o=contoso,c=us”/>
</scopes>

The service in Building2 will be configured using the following discovery scopes.
<scopes>
<add scope=”http://contoso.com/Chicago/Building2″/>
<add scope=”ldap:///ou=Building2,ou=Chicago,o=contoso,c=us”/>
</scopes>

You need to ensure that the client application can discover the service in Building1 or the service in Building2.
Which scopes should you add to the client configuration file?

What should you do?

You are creating a client application and configuring it to call a Windows Communication Foundation (WCF) service.
When the application is deployed, it will be configured to send all messages to a WCF routing service.
You need to ensure that the application can consume the target service after the application is deployed.
What should you do?

Which two actions should you perform?

You develop a Windows Communication Foundation (WCF) service to generate reports.
Client applications call the service to initiate report generation but do not wait for the reports to be generated.
The service does not provide any status to the client applications.
The service class is defined as follows. (Line numbers are included for reference only.)

01 [ServiceContract]
02 public class ReportGeneratorService
03 {
04 …
05 private int GenerateReports(int clientID)
06 {
07 …
08 return 0;
09 }
10 }

You need to ensure that client applications can initiate reports without waiting for status.
Which two actions should you perform (Each correct answer presents part of the solution. Choose two.)

Which code segment should you use?

You are developing a Windows Communication Foundation (WCF) service that contains the following operation contract.

[OperationContract]
CustomerNames GetCustomerNames();

The operation returns customer names. You need to develop a definition for the operation contract that produces XML with the following structure.

<s:Envelope xmlns:s=”http://schemas.xmlsoap.org/soap/envelope/”>
<s:Header />
<s:Body>
<Names xmlns=http://tempuri.org/
xmlns:a=”http://schemas.microsoft.com/2003/10/Serialization/Arrays”
xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”>
<a:string>Customer1</a:string>
<a:string>Customer2</a:string>
<a:string>Customer3</a:string>
</Names>
</s:Body>
</s:Envelope>

Which code segment should you use?

Which code segment should you use?

A Windows Communication Foundation (WCF) service handles online order processing for your company.
You discover that many requests are being made with invalid account numbers.
You create a class named AccountNumberValidator that has a method named Validate.
Before the message is processed, you need to validate account numbers with AccountNumberValidator and reject messages with invalid account numbers.
You create a new class that implements the IParameterInspector interface. Which code segment should you use?

You need to ensure that the service publishes the WSDL description at http://services.contoso.com/OrderLookupS

Your company has a Windows Communication Foundation (WCF) service at the URL http://services.contoso.com/OrderLookupService.svc.
The <system.serviceModel> section of the configuration file is as follows. (Line numbers are included for reference only.)

01 <system.serviceModel>
02 <behaviors>
03 <serviceBehaviors>
04 <behavior>
05 <serviceDebug includeExceptionDetailInFaults=”false” />
06 …
07 </behavior>
08 </serviceBehaviors>
09 </behaviors>
10 <serviceHostingEnvironment multipleSiteBindingsEnabled=”true” />
11 </system.serviceModel>

You need to ensure that the service publishes the WSDL description at http://services.contoso.com/OrderLookupService.svc?wsdl.
What should you do?

Which code segment should you use?

You are developing a client application that consumes a Windows Communication Foundation (WCF) service.
You use the svcutil.exe utility to create a proxy for the service. You use the svcutil.exe switches that generate asynchronous calls.
GetFlight is a service operation that takes no parameters and returns a string.
The GetFlightCallback method must be called when the service operation returns.
You create an instance of the client proxy with the following code:

var client = new TranvelServiceClient();

You need to ensure that a callback is received when the GetFlight operation is called asynchronously. Which code segment should you use?


Page 5 of 15« First...34567...10...Last »