2009年8月13日星期四

70-503 VB exam infromation at TestInside

 70-503 VB exam infromation at TestInside:



1. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

You need to programmatically add the following endpoint definition to the service. Which code segment should you use?

A. String baseAddress="http: //localhost:8000/ExamService";

BasicHttpBinding binding1=new BasicHttpBinding();

using(ServiceHost host=new ServiceHost(typeof(ExamService)))

{

  host.AddServiceEndpoint(typeof(IExam),binding1,baseAddress);

}

B. String baseAddress="http: //localhost:8000/ExamService/service";

BasicHttpBinding binding1=new BasicHttpBinding();

using(ServiceHost host=new ServiceHost(typeof(ExamService)))

{

  host.AddServiceEndpoint(typeof(IExam),binding1,baseAddress);

}

C. String baseAddress="http: //localhost:8000/ExamService";

WsHttpBinding binding1=new WsHttpBinding();

using(ServiceHost host=new ServiceHost(typeof(ExamService)))

{

  host.AddServiceEndpoint(typeof(IExam),binding1,baseAddress);

}

D. String baseAddress="net.tcp: //localhost:8000/ExamService/service";

NetTcpBinding binding1=new NetTcpBinding();

using(ServiceHost host=new ServiceHost(typeof(ExamService)))

{

  host.AddServiceEndpoint(typeof(IExam),binding1,baseAddress);

}

Answer: B


2. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

You write the following code segment.

namespace MyServices

{

  [ServiceContract()]

  interface IManageOrders

  {

    ...

  }

}

The service metadata must be exposed at the relative address named meta.

You need to add an endpoint element to the app.config file of the service host.

Which code fragment should you add?

A. <endpoint address="meta" binding="wsHttpBinding"

contract="IManageOrders" />

B. <endpoint address="meta" binding="wsHttpBinding"

contract="MyServices.IMetadataExchange" />

C. <endpoint address="meta" binding="mexHttpBinding"

contract="IMetadataExchange" />

D. <endpoint address="meta" binding="mexHttpBinding"

contract="MyServices.IManageOrders" />

Answer: C


3. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You have successfully created two interfaces: IMyService and IMyServiceClient.

You need to ensure that the service is able to call methods from the client application by using the IMyServiceClient interface.

Which code segment should you use?

A. [ServiceContract(CallbackContract=typeof(IMyServiceClient))]

public interface IMyService

{

  ...

}

public interface IMyServiceClient

{

  ...

}

B. [ServiceContract(CallbackContract=typeof(IMyService))]

public interface IMyService

{

  ...

}

public interface IMyServiceClient

{

  ...

}

C. [ServiceContract(SessionMode=SessionMode.Allowed)]

[ServiceKnownType(typeof(IMyServiceClient))]

public interface IMyService : IMyServiceClient

{

  ...

}

public interface IMyServiceClient

{

  ...

}

D. [ServiceContract]

[ServiceKnownType(typeof(IMyServiceClient))]

public interface IMyService

{

  ...

}

[ServiceContract]

public interface IMyServiceClient : ICommunicationObject

{

  ...

}

Answer: A


4. You have created a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

The existing service interface is named IMyService, and contains the following code segment.

[ServiceContract(Name="SvcOrder", Namespace="http://contoso.com/services")]

public interface IMyService

{

  [OperationContract]

  void DoSomething();

}

You create a new service named IMyServiceV1 that contains an operation named DoSomethingElse.

You need to ensure that existing client applications are still able to access the IMyService.DoSomething method without modifying client code.

Which code segment should you use?

A. [ServiceContract(Namespace="http:?//contoso.com/services/V1")]

public interface IMyServiceV1 : IMyService

{

  [OperationContract]

  void DoSomethingElse();

}

B. [ServiceContract(Name="SvcOrder")]

public interface IMyServiceV1 : IMyService

{

  [OperationContract]

  void DoSomethingElse();

}

C. [ServiceContract(Name="SvcOrderV1",

 Namespace="http: //contoso.com/services")]

public interface IMyServiceV1 : IMyService

{

  [OperationContract]

  void DoSomethingElse();

}

D. [ServiceContract(Name="SvcOrder",

 Namespace="http: //contoso.com/services")]

public interface IMyServiceV1 : IMyService

{

  [OperationContract]

  void DoSomethingElse();

}

Answer: D


4. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

The service contains the following code segment.

[DataContract]

public class Person

{

  …

 

}

[DataContract]

public class Customer : Person

{

  …

 

}

You need to create a service contract that meets the following requirements:

•The service contract must have an operation contract named GetPerson that returns an object of type Person.

•The GetPerson operation must be able to return an object of type Customer.

Which code segment should you use?

A. [ServiceContract]

[ServiceKnownType("GetPerson")]

public interface IMyService

{

  [OperationContract]

  Person GetPerson();

}

B. [ServiceContract]

public interface IMyService

{

  [OperationContract]

  [ServiceKnownType("Customer")]

  Person GetPerson();

}

C. [ServiceContract]

[ServiceKnownType(typeof(Customer))]

public interface IMyService

{

  [OperationContract]

  Person GetPerson();

}

D. [ServiceContract]

[ServiceKnownType("GetPerson",typeof(Customer))]

public interface IMyService

{

  [OperationContract]

  Person GetPerson();

}

Answer: C 

 1. You create a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

You create the following service contract.

<ServiceContract()> _

Public Interface IMath

  <OperationContract()> _

  Function Add(ByVal num1 As Integer, ByVal num2 As Integer) _

  As Integer

End Interface

You need to add an operation contract to perform the Add operation asynchronously.

Which operation contract should you use?

A. <OperationContract(AsyncPattern:=True)> _

Function BeginAdd(ByVal num1 As Integer, ByVal num2 As Integer) _

As IAsyncResult

Function EndAdd(ByVal res As IAsyncResult) As Integer

B. <OperationContract()> _

Function BeginAdd(ByVal num1 As Integer, ByVal num2 As Integer, _

ByVal cb As AsyncCallback, ByVal state As Object) As Integer

Function EndAdd() As IAsyncResult

C. <OperationContract()> _

Function BeginAdd(ByVal num1 As Integer, ByVal num2 As Integer) _

As IAsyncResult

<OperationContract()> _

Function EndAdd(ByVal res As IAsyncResult) As Integer

D. <OperationContract(AsyncPattern:=True)> _

Function BeginAdd(ByVal num1 As Integer, ByVal num2 As Integer, _

ByVal cb As AsyncCallback, ByVal state As Object) As IAsyncResult

Function EndAdd(ByVal res As IAsyncResult) As Integer

Answer: D


2. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

You write the following code segment.

Namespace MyServices

  <ServiceContract()>Interface IManageOrders

    ...

  End Interface

End Namespace

The service metadata must be exposed at the relative address named meta.

You need to add an endpoint element to the app.config file of the service host.

Which code fragment should you add?

A. <endpoint address="meta" binding="wsHttpBinding" _

contract="IManageOrders" />

B. <endpoint address="meta" binding="wsHttpBinding" _

contract="MyServices.IMetadataExchange" />

C. <endpoint address="meta" binding="mexHttpBinding" _

contract="IMetadataExchange" />

D. <endpoint address="meta" binding="mexHttpBinding" _

contract="MyServices.IManageOrders" />

Answer: C


3. You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You have successfully created two interfaces: IMyService and IMyServiceClient.

You need to ensure that the service is able to call methods from the client application by using the IMyServiceClient interface.

Which code segment should you use?

A. <ServiceContract(CallbackContract:=GetType(IMyServiceClient))> _

Public Interface IMyService

  ...

End Interface

Public Interface IMyServiceClient

  ...

End Interface

B. <ServiceContract(CallbackContract:=GetType(IMyService))> _

Public Interface IMyService

  ...

End Interface

Public Interface IMyServiceClient

  ...

End Interface

C. <ServiceContract(SessionMode:=SessionMode.Allowed)> _

<ServiceKnownType(GetType(IMyServiceClient))> _

Public Interface IMyService

  Inherits IMyServiceClient

  ...

End Interface

Public Interface IMyServiceClient

  ...

End Interface

D. <ServiceContract()> _

<ServiceKnownType(GetType(IMyServiceClient))> _

Public Interface IMyService

  Inherits IMyServiceClient

  ...

End Interface

Public Interface IMyServiceClient

  ...

End Interface

Answer: A


4. You have created a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.

The existing service interface is named IMyService, and contains the following code segment.

<ServiceContract(Name:="SvcOrder", _

Namespace:="http: //contoso.com/services")> _

Public Interface IMyService

  <OperationContract()> _

  Sub DoSomething()

End Interface

You create a new service named IMyServiceV1 that contains an operation named DoSomethingElse.

You need to ensure that existing client applications are still able to access the IMyService.DoSomething method without modifying client code.

Which code segment should you use?

A. <ServiceContract(Namespace:="http: //contoso.com/services/V1")> _

Public Interface IMyServiceV1

  Inherits IMyService

  <OperationContract()> _

  Sub DoSomethingElse()

End Interface

B. <ServiceContract(Name:="SvcOrder")> _

Public Interface IMyServiceV1

  Inherits IMyService

  <OperationContract()> _

  Sub DoSomethingElse()

End Interface

C. <ServiceContract(Name:="SvcOrderV1", _

Namespace:="http: //contoso.com/services")> _

Public Interface IMyServiceV1

  Inherits IMyService

  <OperationContract()> _

  Sub DoSomethingElse()

End Interface

D. <ServiceContract(Name:="SvcOrder", _

Namespace:="http: //contoso.com/services")> _

Public Interface IMyServiceV1

  Inherits IMyService

  <OperationContract()> _

  Sub DoSomethingElse()

End Interface

Answer: D


Others hot exam at TestInside:117-201 exam and 000-377 exam and EX0-105 exam and 70-536 VBexam.

没有评论:

发表评论