spacer [ITS UW
Logo]

ITS Research Program, UW
ITS Web Services

spacer
[Menu Bar] ? Welcome to the ITS-UW Web Services home page.

Web services allow people to build new applications by providing a consistant interface to a variety of data sources. In these pages, you will find some Web Service-oriented items related to the UW ITS applications that use transit and traffic data. We hope to provide web service APIs to complement various web-based projects we manage, such as Busview, MyBus, and Probes.

Web services allow programs to interact with data servers and to retrieve content in a platform-indepedent manner. Unlike web browsing, which is oriented to the human user, web service data is formatted using XML, not HTML. If you have been HTML-scraping the Mybus web site to get at the prediction data fields, ITS web services are for you!

The following UW-ITS web services are currently available:


MyBus
Currently, we have implemented a web service interface to our MyBus application. The Web Services Description (WSDL) provided in XML, describes the services and data elements that are available to create a transit application like Mybus.org. Here is an HTML web page, created by the Microsoft ASP.NET server, that allows you to interact with the web service directly without any programming. Also, see these notes describing the returned values for MyBus web services.

The MyBus Web Services server is based on the Microsoft .NET framework. This server is built around an Internet Information Server with the ASP.NET modules. Using Visual Studio .NET, we have also created some simple client applications which interact with the web services. These are available for download and include the C# source code to get you started.

The sample client applications are packaged as Microsoft Windows Installer setup files. You'll need a recent version of Windows Installer to install them; this comes built into Windows XP but will need to be downloaded for earlier versions.

To execute the applications, you will need to install a copy of the .NET framework on your machine. The .NET framework includes the common language runtime (CLR), which is a program that can execute .NET applications, and a set of base classes that all applications refer to. You can download the .NET framework from Microsoft.

The client application presently available to download is "Get the predicted departure at a timepoint." Once downloaded, you double click on the .msi file, with the .NET Framework installed, and the "Mybus Event Estimator" program is installed, by default, in C:\Program Files\ITS-UW\Mybus Event Estimator\.

When you launch C:\Program Files\ITS-UW\Mybus Event Estimator\GetEstimatesByLocation.exe, you will see:

[Sample Image]

When you enter a timepoint ID, that you find on the Mybus Seattle WAP locations list, you will get the predicted arrival time for busses at that timepoint.

To uninstall this example, use the Windows control panel "Add/Remove Programs".

Added Note (6-20-2006):
The interface described above goes through an IIS server that has been having some reliability problems. If you intend to use the MyBus web service with your own application, you may wish to try the following alternative server address:
http://ws.its.washington.edu:9090/transit/mybus/services/MybusService?WSDL

The following operations are supported. An example of a simple HTTP GET query is shown for each.

  • getTime
    Get the server's value for time; units are milliseconds since the (unix/java) epoch.
    http://ws.its.washington.edu:9090/transit/mybus/services/MybusService?method=getTime
  • getAgencies
    Get names for the transit agencies for which real-time avl data is available. (Note that currently Metro is the only agency.)
    http://ws.its.washington.edu:9090/transit/mybus/services/MybusService?method=getAgencies
  • getEventData
    For a given transit agency name, timepoint, and time window in minutes, get the departure times for that timepoint.
    http://ws.its.washington.edu:9090/transit/mybus/services/MybusService?method=getEventData& in0=30&in1=-10&in2=5903&in3=http://transit.metrokc.gov
    (in this case, the time window is set for 10 minutes in the past, 30 minutes in the future, and the timepoint is 5903)
    For each scheduled departure from the given timepoint, this will return:
    • goalDeviation (difference in seconds between scheduled and predicted departure times)
    • schedTime (scheduled departure, in seconds past midnight)
    • timestamp (time, in milliseconds past epoch)
    • goalTime (predicted departure time, in seconds past midnight)
    • distanceToGoal (current distance of bus from timepoint, in feet)
    • destination (destination string for this bus)
    • route (route number of the bus)


Bus Location
This service provides real-time automatic vehicle location (avl) data for transit vehicles. Locations are in lat/long and state plane coordinates. This service provides access to the same bus location information used by our Busview program.

The WSDL is available at http://ws.its.washington.edu:9090/transit/avl/services/AvlService?WSDL

The following operations are supported. An example of a simple HTTP GET query is shown for each.

  • getTime
    Get the server's value for time; units are milliseconds since the (unix/java) epoch.
    http://ws.its.washington.edu:9090/transit/avl/services/AvlService?method=getTime
  • getAgencies
    Get names for the transit agencies for which real-time avl data is available. (Note that currently Metro is the only agency.)
    http://ws.its.washington.edu:9090/transit/avl/services/AvlService?method=getAgencies
  • getLatestByRoute
    For a given transit agency name, get the latest avl data for vehicles on a given route.
    http://ws.its.washington.edu:9090/transit/avl/services/AvlService?method=getLatestByRoute& routeID=nnn&agencyName=http://transit.metrokc.gov (where "nnn" is the route number)
    Route:


NOTICE: Funding for Loop Data Feed has not been Renewed

TMS (Highway Loop Sensors)
Highway loop sensor data, from WSDOT's Traffic Management System, is also available as a web service. The WSDL may be found at http://ws.its.washington.edu:9090/tms/services/TMSService?wsdl

For descriptions of loops sensors, fields, and cabinet-naming conventions, see the documentation for our loop data archive (TDAD).

Sample TMS client program

A sample client program with graphical interface (written in Java and using AXIS) is available here. Java source code is included in the zip file. Unpack the zip and run the bat file to run the client.

A 'Web Start' version is also available here. (Note that the jar has been locally signed, but not officially registered, so you will see a warning message when you run this.)

To use the TMS client, first select a cabinet name from the list on the left, then select the sensors for which you want data in the list in the middle, then click the 'Get Data' button. The most recent 20-second data will appear in the boxes on the right. Clicking the 'Auto Refresh' checkbox will update the displayed data every 20 seconds. Data can be stored in a file by clicking the 'Record' checkbox.

TMS web service operations

The following web service operations are available. For each operation, a simple HTTP GET query query is shown. Operations that take a parameter require a cabinet name ("ES-333D" is used here for an example). Replies are SOAP encoded.
  • getDate
    Returns timestamp of loop data
    http://ws.its.washington.edu:9090/tms/services/TMSService?method=getDate
  • getCabinetInfo
    Get information (cabinet name, highway, cross street) for all cabinets
    http://ws.its.washington.edu:9090/tms/services/TMSService?method=getCabinetInfo
  • getCabLocation
    Get cabinet location (lat/long and milepost)
    http://ws.its.washington.edu:9090/tms/services/TMSService?method=getCabLocation&cabId=ES-333D
    Cabinet name:
  • getCabLoopsInfo
    Get info about all sensors in a cabinet
    http://ws.its.washington.edu:9090/tms/services/TMSService?method=getCabLoopsInfo&cabId=ES-333D
    Cabinet name:
  • getCabLoopsReport
    Get loop reports for a cabinet
    http://ws.its.washington.edu:9090/tms/services/TMSService?method=getCabLoopsReport& cabId=ES-333D
    Cabinet name:
  • getCabStationReport
    Get station reports for a cabinet
    http://ws.its.washington.edu:9090/tms/services/TMSService?method=getCabStationReport& cabId=ES-333D
    Cabinet name:
  • getCabSpeedTrapsReport
    Get speed trap reports for a cabinet
    http://ws.its.washington.edu:9090/tms/services/TMSService?method=getCabSpeedTrapsReport& cabId=ES-333D
    Cabinet name:


Valid HTML 4.01!

[Blue Line]

ITS UW Home | Contact Page | People | Projects | Publications | Software | Applications | Job Openings | Other ITS Sites | ITS Intranet

webmaster@its.washington.edu
its@its.washington.edu (for ITS Web Services)

January 8, 2003