QUIZ ON BASIC WEB SERVICES (2)
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.
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?
Use the Web Services Discovery tool to
download the information.
Use the Web Services Description Language (WSDL) tool to create a proxy class
Use a UDDI registry to locate the Web service
Use a search engine to explore your partner’s Web site
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
The client project and the Web service project must use the same language
Objects supplied by a Web service cannot cross a firewall.
The client project does not contain a reference t
o the System.Data namespace
Web services cannot properly serialize a complex object such as a DataSet.
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?
Create a new DataSet object and use the ReadXml() method of the DataSet object to
initialize it from the returning SOAP message.
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
Assign the return value from the GetOrders() method to an array of DataRow
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.
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
.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
l, using the /namespace:CS option
D. Select File, Save As, and save the file with the .cs exten
Explain what a proxy class is, and two ways in which you can build proxy classes for a