The SIRI command-line client application is a simple command-line tool for querying SIRI data providers.

Getting the Client

You can download the latest client here:


Using the Client

You'll need a Java 1.6 runtime installed to run the client. To run the client:

java -jar onebusaway-siri-client-cli.jar [-args] request [request ...]


  • -id userId : specify the SIRI client user id
  • -clientUrl url : the url your client publishes to a server in publish/subscribe
  • -privateClientUrl url : the internal url your client will actually bind to, if specified (default=clientUrl)
  • -output path : write SIRI payload output to the specified path. See details below.
  • -responseTimeout time : time, in seconds, to wait for a response from a SIRI endpoint after a request
  • -logRawXml ... : if specified, indicates how raw SIRI XML should be logged to the console. Valid values include:
    • NONE - nothing is logged (the default)
    • DATA - only ServiceDelivery data messages are logged
    • CONTROL - only non-ServiceDelivery control messages are logged
    • ALL - everything is logged

Specific Request Types

By default, the SIRI client will construct a single <ServiceRequest/> based on the request spec. The client will send the service request and then wait for a response from the SIRI endpoint. However, other types of requests can be constructed, based on command line arguments:

  • -subscribe : the client should send a <SubscriptionRequest/>
  • -terminateSubscription : the client should send a <TerminateSubscriptionRequest/>
  • -checkStatus : the client should send a <CheckStatusRequest/>

Request Spec

Each request command line argument indicates a SIRI service or subscription request, defining the properties of the request and the SIRI endpoint. The request has the following syntax:


At minimum, you need to specify a Url that indicates the SIRI resource to connect to, and a ModuleType that indicates the SIRI module type to request. Additional keys specific to the module type can be used to further filter the request. For example:


For more details, see the full command-line request spec documentation.


By default, data received from a remote SIRI data-source will be output to the console. However, with the -output argument, it is possible to write output to disk as well. You can specify a single file, such as:

-output /tmp/siri-output

And all output will go to the file, appending new XML messages as they are received. We also support simple variable substitution of the file name, using the same syntax as java.util.Formatter. We pass a java.util.Date object as the first argument to the formatter, which means you can do complex time-based naming of the output files. For example, the following:

-output /tmp/siri-%1$tFT%1$tT.%1$tL.xml

will write each received XML message to a separate file with a filename that looks like:


You can even specify the format as part of the directory name:

-output /tmp/%1$tF/%1$tT.%1$tL.xml

and the application will automatically create the output directory automatically:



Say there's a SIRI data source at http://localhost:9090/ that's producing Vehicle Monitoring data. You can subscribe to VM events with the following command:

java -jar onebusaway-siri-client-cli.jar -subscribe Url=http://localhost:9090/,ModuleType=VEHICLE_MONITORING

You should start getting SIRI updates printed to the console:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <ServiceDelivery xmlns="">