BlackBerry
Skip Top Navigation
Developers Partners
North America [change region] Products Solutions Purchasing Support
Developers


Compile, Publish, and Test the Web Service

Exercise

In this lab you will compile and test the web service that you created in the previous lab.

Prerequisites

Objectives

  • Discover how to compile and test the web service.

Setup Tasks

Verify that your final code from the previous lab resembles the sample code (ASMX).

Tasks

  1. To build and run the web service, in Microsoft Visual Studio .NET, press F5.
  2. To view a list of web service attributes and operations, in a browser, view the implemented web service at http://localhost/MetricConvWS/Service1.asmx.
  3. To view the WSDL generated for the web service, click the Service Description link.
  4. Test of the web service operations by clicking the operation name links. For example, to test the km2mile link.
  5. Invoke the operation with a parameter.
  6. For example, invoking the operation with 1 as the parameter displays the result in SOAP format in the browser.
        <?xml version="1.0" encoding="utf-8" ?>
    <double xmlns="http://rim.net/">0.6214</double>

Check Your Work

If you can invoke the web service: http://localhost/MetricConvWS/Service1.asmx, then this means you have done the lab correctly.

Microsoft .NET will create several files under IIS Server C:\Inetpub\wwwroot\MetricConvWS folder and two additional files under default My Documents\Visual Studio Projects folder. Below are sample files. Your files should be similar to these.

Files under IIS Server C:\Inetpub\wwwroot\MetricConvWS folder - ZIP
Files under default My Documents\Visual Studio Projects folder - ZIP

Additional Labs

Go to the next exercise in "Building a Measurement Conversion Web Service Using .NET", Create a Simple Microsoft Windows Application to Test the Web Service.

Back to the Developer Lab Main Menu

 
     
 Home | Products | Solutions | Purchasing | Support | Developers | Worldwide | News | About Us | Contact Us | Site Map
 Legal | Copyright © 2008 Research In Motion Limited, unless otherwise noted.