QUIZ ON BASIC WEB SERVICES (2)

learningsnortΑσφάλεια

3 Νοε 2013 (πριν από 3 χρόνια και 5 μήνες)

69 εμφανίσεις


-

1

-

QUIZ ON BASIC WEB SERVICES (2)


NAME: _____________________________________


Print a copy of this quiz, complete it, and bring it to class on Monday. Failure to do this will
result in a score of 0.


The questions which follow are taken from sample questio
ns for use in preparing for the
Microsoft MCSD exam for Web Services. Some of the questions will cover material not
presented in class. All questions will likely research using MSDN Help. Your text,
“Programming .NET Web Services” will also help you ans
wer these questions.


1.

One of your partner businesses has informed you that it is making its inventory
information available via a Web service. You do not know the Web service’s URL.
How can you discover the URL?


A.
Use the Web Services Discovery tool to

download the information.


B.
Use the Web Services Description Language (WSDL) tool to create a proxy class


C.
Use a UDDI registry to locate the Web service


D.
Use a search engine to explore your partner’s Web site



2.

You are invoking a Web service that
returns a DataSet object. Your client application is
written in Visual C# .NET, whereas the Web service itself is written in Visual Basic
.NET. The Web service is outside your corporate firewall. You receive an “object not
found” error when you call the

method that returns the DataSet. What could be the
problem?


A.
The client project and the Web service project must use the same language


B.
Objects supplied by a Web service cannot cross a firewall.


C.
The client project does not contain a reference t
o the System.Data namespace


D.
Web services cannot properly serialize a complex object such as a DataSet.












-

2

-

3.

Your application invokes a Web service named Northwind that includes a Web method
named GetOrders(). GetOrders() returns a DataSet object
containing order information.
What must you do to use this Dataset object in your client application?


A.
Create a new DataSet object and use the ReadXml() method of the DataSet object to
initialize it from the returning SOAP message.


B.
Obtain an XSD fi
le that specifies the schema of the DataSet object. Use this XSD file
to instantiate a DataSet object from the returned data from the GetOrders() method


C.
Assign the return value from the GetOrders() method to an array of DataRow
variables. Loop
throug
h an array to build the DataSet.


D. Assign the return value from the GetOrders() method to a DataSet variable.



Suggestion for the next question; launch wsdl from the dos prompt, and examine the switches
and options available in this utility.


4.

You have u
sed the Web Services Description Language tool to create a proxy class for a
Web service. When you add the proxy class to your project, you discover that it is coded
in the Visual Basic .NET language. What must you do to get the proxy class in Visual
C#
.NET instead of Visual Basic .NET?


A. Manually convert the Visual Basic .NET code to C# code


B. Rerun the tool using the /language:CS option


C. Rerun the to
o
l, using the /namespace:CS option


D. Select File, Save As, and save the file with the .cs exten
sion



5.

Explain what a proxy class is, and two ways in which you can build proxy classes for a
Web Service: