Microsoft TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4 認定 070-513 試験問題:
1. A class named TestService implements the following interface.
TestService is hosted in an ASP.NET applicator.
You need to modify the application to allow the GetServiceTime method to return the data formatted as JSON.
It must do this only when the request URL ends in lServiceTime.
What should you do?
A) Add this attribute to the GetServiceTime method
<Webinvoke(Method PGETw,
UrTemplate:eiSeneiceTim&, ResponseFormat: WebMessageFormatJson)>
In the bconfIg file, configure TestService in the system.arviceModeI/services collection as
follows. <senvice
namee"TestService"> <endpoint ad&esse"ISer,iceTime"r
contracte"TestSence' bindingewebHttpBindngw />
c/service>
B) Add this attribute to the GetServiceTime method
<webGet(
ResponseFormat WebMessageFormatJson,
UnTemplate:eJServiceTime")>?
Create a new svc file named Jsonversion svc with the following contract <%@ ServiceHost
Servicee"TessService"i
Factory="System ServiceModelktivation WebServiceHosFactory" %s
C) Add this attribute to the GetServiceTime method <webinvoke(Method "POST)> In the bconfig file, add this element to systemserviceModeI/behaviors/endpointBehaviors. <behavior names"Json">e <enableWebScript
c/behavior>
In the web.config file, configure TestService in the system.serviceModel/services collection
as follows.
<service name"TestService">s
<endpoint address/ServiceTime"
contract-"TestSerAce""
behaviorConlfgurationz'Json
bindinge"webHttpBinding"!> <!services
D) Add this attribute to the GetServiceTime method
<WebGet(UriTempbte: z"{Json}/ServiceTime")>
Create a new svc file named Jsonversionsvc with the following contert <%@ ServiceHost
Service="TestSenvice"
Factoryz'System Se viceMode[ktivationWebServiceHodFactory" %>
2. You have a Windows Communication Foundation (WCF) service.
The service has issues with performance when it receives messages on a specific endpoint. The service must collect the minimum number of performance counters to diagnose the message issues.
You need to configure the service.
In the web.config file for the service, what should you do?
A) In the service configuration diagnostics section, set the value of the performanceCounters property to ServiceOnly.
B) In the service configuration diagnostics section, set the value of the performancCounters property to All.
C) Enable the Windows Management Instrumentation (WMI) provider.
D) Enable message logging for the endpoint.
3. A Windows Communication Foundation (WCF) client communicates with a service. You created the client proxy by using Add Service Reference in Microsoft Visual Studio.
You need to ensure that the client accepts responses of up to 5 MB in size.
What should you change in the configuration file'?
A) the value of the maxReceivedMessageSize attribute to 5242880
B) the value of the maxBytesPerRead attribute to 5242880
C) the value of the maxBufferPoolSize attribute to 5242880
D) the value of the maxBufferSize attribute to 5242880
4. You are developing a Windows Communication Foundation (WCF) service.
The service operation takes a customer number as the only argument and returns information about the customer.
The service requires a security token in the header of the message.
You need to create a message contract for the service.
Which code segment should you use?
A) [ServiceContract]
public interface IService
{ [OperationContract]
CustomerInformation GetCustomerInformation(Header header,
int customerNumber);
} [MessageContract] public class CustomerInformation { } [MessageContract] public class
Header { [MessageHeader] public string SecurityTag; }
B) [ServiceContract]
public interface IService
{
[OperationContract]
CustomerInformation GetCustomerInformation(
CustomerNumber request);
}
[MessageContract]
public class CustomerInformation
{
......
}
[MessageContract] public class CustomerNumber
{
[MessageHeader]
public string SecurityTag;
[MessageBodyMember]
public int CustomerNumberElement;
}
C) [ServiceContract]
public interface IService
{
[OperationContract]
CustomerInformation GetCustomerInformation(Header header,
int customerNumber);
}
[DataContract]
public class CustomerInformation
{
.......
}
[MessageContract]
public class Header { [MessageHeader] public string SecurityTag;
}
D) [ServiceContract]
public interface IService {
[OperationContract]
CustomerInformation GetCustomerInformation( CustomerNumber request);
}
[DataContract]
public class CustomerInformation { } [MessageContract] public class CustomerNumber {
[MessageHeader]
public string SecurityTag; [MessageBodyMember] public int CustomerNumberElement; }
5. You have a Windows Communication Foundation (WCF) service that accepts the following message contract.
You need to ensure that the client sends a SOAP body that is accepted by the service.
A) <Ticket xmlns="http://www.movies. com">
<NumberOfSeats
xmlns="http : //www.movietheater . com">
0
</NumberOfSeats>
<ReservationName xmlns="http://www.movietheater .com" />
<ShowTime
xmlns="http://www.movietheater.com">
2010-07-05T00:SI:10.0999304-05:00
</ShowTime>
</Ticket>
B) <Ticket xmlns="http://www. movietheatec.com">
<ShowTime
xmlns-"http://www.movietheater.com">
2010-07-05TOO:51:10.0999304-05:00
</ShowTime>
<NumberOfSeats
xmlns="http://wwv.movietheatec.com"> 0
</NumberOfSeats>
<ReservationName
xmlns="http://www.movletheatec.com" />
</Ticket>
C) <Ticket xmlns="http://wwv.movies.com">
<ShowTime
xmlns-"http://www.movietheatec.com">
2010-07-05TOO:51:10.0999304-05:00
</ShowTime>
<Number Of Seats
xmlns="http://www.movietheater.com"> 0
</NumbecOfSeats>
<ReservationName xmlns""http://www.movietheotec.com" />
</Ticket>
D) <Ticket xmlns="http://www.movietheater.com">
<ShowTime
xmlns="http : //www.movietheater . com">
2010-07-05T00:51:10.0999304-05:00
</ShowTime>
<ReservationName xmlns="http://www.movietheater.com" />
<NumberOfSeats
xmlns="http://www.movietheater.com">
0
</NumberOfSeats>
</Ticket>
質問と回答:
| 質問 # 1 正解: B | 質問 # 2 正解: B | 質問 # 3 正解: A | 質問 # 4 正解: B | 質問 # 5 正解: C |














1088 お客様のコメント
品質保証JPexamはIT認定試験のシラバスに従って、試験問題の範囲を正確に絞って、的中率が99%の最新問題集を捧げます。
1年間の無料更新サービスJPexamは1年以内に問題集の無料更新サービスを提供し、お客様がいつでも最新版の問題集を持つことを保証いたします。もし試験の内容が変更されたら、弊社は直ちにお客様にお知らせします。それに、弊社の問題集が更新されたら、早速メールで最新バージョンを送付いたします。
全額返金JPexamの問題集を利用すると、短時間で勉強しても試験に合格できるのを保証いたします。試験に不合格になってしまった場合、弊社は全額返金いたします。(
ご購入前のお試しJPexamは問題集のサンプルを無料で提供いたします。ご購入前にサンプルを試用して製品の品質を確認することができます。ご遠慮なく利用してください。
