70 503 (VB)
70 503 (VB)
Microsoft 70-503(VB)
Q&A Demo
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.
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.
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?
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?
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
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
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
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
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?
Answer: B
Question: 10
You are creating a Windows Communication Foundation (WCF) service by using Microsoft
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()> _
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
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?
Answer: B