0% found this document useful (0 votes)
75 views13 pages

70 503 (VB)

Uploaded by

pingbadri
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views13 pages

70 503 (VB)

Uploaded by

pingbadri
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Certkey 70-503(VB)

Microsoft 70-503(VB)

TS: MS.NET Frmwrk 3.5, Wndws Commun Fndtion App


Dev

Q&A Demo

Copyright 2004-2010 FREE IT CERTIFICATIONS SERVICES Ltd. All Rights Reserved.

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
Important Note
Please Read Carefully

Study Tips

This product will provide you questions and answers carefully compiled and written by our
experts. Try to understand the concepts behind the questions instead of cramming the
questions.

Go through the entire document at least twice so that you make sure that you are not missing
anything.

Latest Version

We are constantly reviewing our products. New material is added and old material is revised.
Free updates are available for 120 days after the purchase. You should check your member
zone at Certkey an update 3-4 days before the scheduled exam date.

Feedback

If you spot a possible improvement then please let us know. We always interested in
improving product quality.
Feedback should be send to [email protected]. You should include the following:
Exam number, version, page number, question number, and your login ID.
Our experts will answer your mail promptly.

Be Prepared. Be Confident. Get Certified.


-------------------------------------------------------------------------------------------------------------------------
Sales and Support Manager
Sales Team: [email protected] Support Team: [email protected]
---------------------------------------------------------------------------------------------------------------------

Copyright

Each pdf file contains a unique serial number associated with your particular name and
contact information for security purposes. So if we find out that a particular pdf file is being
distributed by you, FREE IT CERTIFICATIONS SERVICES reserves the right to take legal action
against you according to the International Copyright Laws.

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
Question: 1
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

Question: 2
You are creating a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5. You have successfully created two interfaces: IMyService and
IMyServiceClient.
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
...

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
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

Question: 3
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")> _

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
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

Question: 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
...
End Class
<DataContract()> _ Public Class Customer
Inherits Person
...
End Class
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()> _ Function GetPerson() As Person
End Interface
B. <ServiceContract()> _ Public Interface IMyService
<OperationContract()> _
<ServiceKnownType("Customer")> _ Function GetPerson() As Person
End Interface
C. <ServiceContract()> _
<ServiceKnownType(GetType(Customer))> _ Public Interface IMyService
<OperationContract()> _ Function GetPerson() As Person
End Interface
D. <ServiceContract()> _
<ServiceKnownType("GetPerson", GetType(Customer))> _ Public Interface IMyService
<OperationContract()> _ Function GetPerson() As Person

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
End Interface

Answer: C

Question: 5
You create a Windows Communication Foundation (WCF) service by using Microsoft .NET
Framework 3.5.
The WCF service contains two operations named ProcessSimpleOrder and
ProcessComplexOrder.
You need to expose the ProcessSimpleOrder operation to all the client applications. You also
need to expose the ProcessComplexOrder operation only to specific client applications.
Which code segment should you use?

A. <ServiceContract()> _
Public Interface IOrderManager
<OperationContract(Action:="*")> _ Sub ProcessSimpleOrder()
<OperationContract()> _
Sub ProcessComplexOrder() End Interface
B. <ServiceContract()> _
Public Interface IOrderManager
<OperationContract(Name:="http: //contoso.com/Simple")> _ Sub ProcessSimpleOrder()
<OperationContract(Name:="http: //contoso.com/Complex")> _ Sub ProcessComplexOrder()
End Interface
C. <ServiceContract()> _
Public Interface ISimpleOrderManager
<OperationContract()> _ Sub ProcessSimpleOrder()
End Interface
<ServiceContract()> _
Public Interface IComplexOrderManager
Inherits ISimpleOrderManager
<OperationContract()> _
Sub ProcessComplexOrder() End Interface
D. <ServiceContract()> _
Public Interface ISimpleOrderManager
<OperationContract(Name:="http: //contoso.com/Simple")> _ Sub ProcessSimpleOrder()
End Interface
Public Interface IComplexOrderManager
Inherits ISimpleOrderManager
<OperationContract(Name:="http: //contoso.com/Complex")> _ Sub ProcessComplexOrder()
End Interface

Answer: C

Question: 6

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
You are creating a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5.
You need to ensure that the service can send data in the following format to the client
applications.
<Account Id="">
<Name> </Name>
<Balance Currency=""> </Balance>
</Account>
Which code segment should you use?

A. <Serializable()> _
Public Class Account
<XmlAttribute()> _ Public Id As String
<XmlElement()> _ Public Name As String
<XmlAttribute()> _
Public Currency As String
<XmlElement()> _
Public Balance As Double
End Class
B. <DataContract()> _ Public Class Account
<DataMember(Order:=0)> _ Public Id As String
<DataMember(Order:=1)> _
Public Name As String
<DataMember(Order:=0)> _ Public Balance As Double
<DataMember(Order:=1)> _ Public Currency As String
End Class
C. <Serializable()> _ Public Class Account
<XmlAttribute()> _ Public Id As String Public Name As String
<XmlElement("Balance")> _ Public Balance As BalanceVal
End Class
<Serializable()> _
Public Class BalanceVal
<XmlText()> _
Public Amount As Double
<XmlAttribute()> _
Public Currency As String
End Class
D. <DataContract()> _ Public Class Account
<DataMember(Order:=0)> _ Public Id As String
<DataMember(Order:=1)> _ Public Name As String
<DataMember(Name:="Balance", Order:=2)> _ Public Balance As BalanceVal
End Class
<DataContract()> _
Public Structure BalanceVal

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
<DataMember(Order:=0)> _ Public Amount As Double
<DataMember(Order:=1)> _ Public Currency As String
End Structure

Answer: C

Question: 7
You create a Windows Communication Foundation (WCF) service by using Microsoft .NET
Framework 3.5.
You write the following code segment. (Line numbers are included for reference only.)
01 Public Interface IMyService
02
03 Function ProcessString(ByVal name As String) As String
04 End Interface
You create a host for the WCF service. You also create a service endpoint at http:
//localhost:8080/service. You add an instance of the HttpTransferEndPointBehavior class to
the host.
You need to ensure that the ProcessString method can be invoked from a Web browser by
using the URL
http: //localhost:8080/service/process?name=value
Which code segment should you insert at line 02?

A. <OperationContract(Name:="process", Action:="Get")> _
B. <OperationContract(Name:="process", Action:="Post")> _
C. <OperationContract()> _
<HttpTransferContract(Path:="process", Method:="Get")> _
D. <OperationContract()> _
<HttpTransferContract(Path:="process", Method:="Post")> _

Answer: C

Question: 8
You create a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5.
You write the following code segment.
<ServiceContract()> _
Public Interface IMathService
<OperationContract()> _ Function AddNumbers( _
ByVal a As Integer, ByVal b As Integer) As Integer
Function AddNumbers( _
ByVal a As Double, ByVal b As Double) As Double
End Interface
You have not deployed the IMathService service.
You need to expose the AddNumbers (a As Double, b As Double) As Double operation to the

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
IMathService service contract.
Which code segment should you use?

A. <OperationContract()> _
Function AddNumbers( _
ByVal a As Integer, ByVal b As Integer) As Integer
<OperationContract()> _ Function AddNumbers( _
ByVal a As Double, ByVal b As Double) As Double
B. <OperationContract(Name:="AddInt")> _ Function AddNumbers( _
ByVal a As Integer, ByVal b As Integer) As Integer
<OperationContract(Name:="AddDouble")> _ Function AddNumbers( _
ByVal a As Double, ByVal b As Double) As Double
C. <OperationContract(Action:="IMathService/AddInt")> _ Function AddNumbers( _
ByVal a As Integer, ByVal b As Integer) As Integer
<OperationContract(Action:="IMathService/AddDouble")> _ Function AddNumbers( _
ByVal a As Double, ByVal b As Double) As Double
D. <OperationContract(Action:="AddInt/*")> _ Function AddNumbers( _
ByVal a As Integer, ByVal b As Integer) As Integer
<OperationContract(Action:="AddDouble/*")> _ Function AddNumbers( _
ByVal a As Double, ByVal b As Double) As Double

Answer: B

Question: 9
You are creating a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5. The service will expose a method named DoProcess to the client applications.
You write the following code segment. (Line numbers are included for reference only.)
01 <ServiceContract()> _
02 Public Interface IMyService
03
04 End Interface
You need to ensure that the client applications are not required to obtain results from the
DoProcess method.
Which code segment should you insert at line 03?

A. <OperationContract(IsOneWay:=True)> _ Function DoProcess() As Boolean


B. <OperationContract(IsOneWay:=True)> _ Sub DoProcess()
C. <OperationContract(AsyncPattern:=False)> _ Function DoProcess() As Boolean
D. <OperationContract(AsyncPattern:=False)> _ Sub DoProcess()

Answer: B

Question: 10
You are creating a Windows Communication Foundation (WCF) service by using Microsoft

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
.NET
Framework 3.5.
You configure a binding to enable streaming.
You need to ensure that the client application is able to stream large XML files to the WCF
service. Which operation contract should you create?

A. <OperationContract()> _
Sub UploadFile(ByVal xmlData As Stream)
B. <OperationContract()> _
Sub UploadFile(ByVal xmlData As XmlWriter)
C. <OperationContract()> _
Sub UploadFile(ByVal xmlData As StreamWriter)
D. <OperationContract()> _
Sub UploadFile(ByVal xmlData As Byte())

Answer: A

Question: 11
You create a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5. You write the following code segment. (Line numbers are included for
reference only.)
01 <ServiceContract(SessionMode:=SessionMode.Required)> _
02 Public Interface IOrderManager
03
04 Sub CloseOrder()
05 End Interface
You need to decorate the operation as the method that closes the current session. Which code
segment should you insert at line 03?

A. <OperationContract(IsInitiating:=False)> _
B. <OperationContract(IsTerminating:=True)> _
C. <OperationContract()> _
<OperationBehavior( _ ReleaseInstanceMode:=ReleaseInstanceMode.AfterCall)> _
D. <OperationContract(IsTerminating:=False)> _
<OperationBehavior( _
ReleaseInstanceMode:=ReleaseInstanceMode.AfterCall)> _

Answer: B

Question: 12
You are creating a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5.
You create the following service contract. (Line numbers are included for reference only.)
01 <ServiceContract()> _

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
02 Public Interface IMyService
03 <OperationContract()> _
04
05 Function GetData(ByVal index As Integer) As List(Of String)
06 End Interface
You need to ensure that the GetData operation can be accessed by using the URI in the
following manner:
•GetData/1 for the index value 1
•GetData/2 for the index value 2
•.
•.
•GetData/n for the index value n
Which code segment should you insert at line 04?

A. <WebGet(UriTemplate:="GetData/{index}", _ BodyStyle:=WebMessageBodyStyle.Bare)> _
B. <WebGet(UriTemplate:="GetData?index={index}", _
BodyStyle:=WebMessageBodyStyle.Bare)> _
C. <WebGet(UriTemplate:="GetData/[index]", _ BodyStyle:=WebMessageBodyStyle.Bare)> _
D. <WebGet(UriTemplate:="GetData?index=[index]", _
BodyStyle:=WebMessageBodyStyle.Bare)> _

Answer: A

Question: 13
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

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
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

Question: 14
You are creating a Windows Communication Foundation service by using Microsoft .NET
Framework 3.5.
You need to ensure that data sent in a SOAP header is in the following XML format.
<Data>
<string>String 1</string>
<string>String 2</string>
<string>String 3</string>
</Data>
Which code segment should you use?

A. <MessageContract()> _
Public Class MyMessage
<MessageHeader()> _ Public Data() As String
End Class
B. <MessageContract()> _ Public Class MyMessage
<MessageHeaderArray()> _ Public Data() As String
End Class
C. <MessageContract()> _ Public Class MyMessage
<MessageProperty()> _ Public Data() As String
End Class
D. <MessageContract()> _ Public Class MyMessage
<MessageBodyMember(Order:=0)> _ Public Data() As String
End Class

Answer: A

Question: 15
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.
http://localhost:8000/ExamService/service
Which code segment should you use?

A. Dim baseAddress As String = "http: //localhost:8000/ExamService" Dim binding1 As New


BasicHttpBinding()
Using host As New ServiceHost(GetType(ExamService))

Certkey.com - Make You Succeed To Pass IT Exams


Certkey 70-503(VB)
host.AddServiceEndpoint(GetType(IExam), binding1, baseAddress) End Using
B. Dim baseAddress As String = _ "http: //localhost:8000/ExamService/service" Dim binding1
As New BasicHttpBinding()
Using host As New ServiceHost(GetType(ExamService))
host.AddServiceEndpoint(GetType(IExam), binding1, baseAddress) End Using
C. Dim baseAddress As String = "http: //localhost:8000/ExamService" Dim binding1 As New
WSHttpBinding()
Using host As New ServiceHost(GetType(ExamService))
host.AddServiceEndpoint(GetType(IExam), binding1, baseAddress) End Using
D. Dim baseAddress As String = _
"http: //localhost:8000/ExamService/service" Dim binding1 As New NetTcpBinding()
Using host As New ServiceHost(GetType(ExamService))
host.AddServiceEndpoint(GetType(IExam), binding1, baseAddress) End Using

Answer: B

Certkey.com - Make You Succeed To Pass IT Exams

You might also like