QueryServicesRequest

99 views
Skip to first unread message

Francois Linkus

unread,
Aug 26, 2016, 11:06:16 AM8/26/16
to A gathering place for the Open Rail Data community
Hi I'm trying to use the QueryServicesRequest method in the LDB Webservice (Staff Version)

But I don't know what the sdd, filterTime fields should be formatted like. I'm in no way a SOAP expert so maybe it is self explaining but I dunno

I just want to try a request and I'm getting a 'String was not recognized as a valid DateTime' error


      <ldb:QueryServicesRequest>
         <ldb:serviceID>GW1175</ldb:serviceID>
         <ldb:sdd>?</ldb:sdd>
         <!--Optional:-->
         <ldb:filterTime>?</ldb:filterTime>
         <!--Optional:-->
         <ldb:filtercrs>?</ldb:filtercrs>
         <!--Optional:-->
         <ldb:tocFilter>?</ldb:tocFilter>
      </ldb:QueryServicesRequest>
   </soap:Body>
</soap:Envelope>

Can anyone help?

Kind thanks
FL

andrew.t...@gmail.com

unread,
Aug 27, 2016, 6:09:13 AM8/27/16
to A gathering place for the Open Rail Data community
An example is below:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://thalesgroup.com/RTTI/2013-11-28/Token/types" xmlns:ldb="http://thalesgroup.com/RTTI/2015-11-27/ldbsv/">
<soapenv:Header>
<typ:AccessToken>
<typ:TokenValue>YOUR TOKEN GOES HERE</typ:TokenValue>
</typ:AccessToken>
</soapenv:Header>
<soapenv:Body>
<ldb:QueryServicesRequest>
<ldb:serviceID>L44696</ldb:serviceID>
<ldb:sdd>2016-08-27</ldb:sdd>
</ldb:QueryServicesRequest>
</soapenv:Body>
</soapenv:Envelope>

The serviceID is the Train UID (of the form Annnnn) and the sdd is the origin date of the form YYYY-MM_DD. This gives a result as below:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<QueryServicesResponse xmlns="http://thalesgroup.com/RTTI/2015-11-27/ldbsv/">
<QueryServicesResult>
<scheduleStartDate xmlns="http://thalesgroup.com/RTTI/2012-01-13/ldbsv/types">2016-08-27</scheduleStartDate>
<serviceList xmlns="http://thalesgroup.com/RTTI/2012-01-13/ldbsv/types">
<service>
<rid>201608275082750</rid>
<uid>L44696</uid>
<trainid>9B08</trainid>
<rsid>CC5646</rsid>
<originName>London Liverpool Street</originName>
<originCrs>LST</originCrs>
<destinationName>Shoeburyness</destinationName>
<destinationCrs>SRY</destinationCrs>
<scheduledDeparture>2016-08-27T10:43:00</scheduledDeparture>
<scheduledArrival>2016-08-27T11:53:00</scheduledArrival>
</service>
</serviceList>
</QueryServicesResult>
</QueryServicesResponse>
</soap:Body>
</soap:Envelope>

A

Rail Ale Fan

unread,
Aug 27, 2016, 6:16:01 AM8/27/16
to Francois Linkus, A gathering place for the Open Rail Data community
Hello Francois,

Only serviceID and sdd are required fields for QueryServices.

sdd is of type xs:date e.g. "2016-08-27".

filterTime is a single xs:time value e.g. "10:30:00".  Local time assumed if timezone ommitted. Values greater than scheduledArrival appear to be accepted if a train is currently active but running late, however this isn't documented.

( http://www.w3schools.com/xml/schema_dtypes_date.asp )

filtercrs, 3-letter station code where the service originates, calls or terminates e.g. "MAN"

filterToc, 2-letter train operator code e.g. "XC".

Example using;

<ns1:QueryServicesRequest>
  <ns1:serviceID>1V49</ns1:serviceID>
  <ns1:sdd>2016-08-27</ns1:sdd>
  <ns1:filterTime>09:07:00</ns1:filterTime>
  <ns1:filtercrs>MAN</ns1:filtercrs>
  <ns1:tocFilter>XC</ns1:tocFilter>
</ns1:QueryServicesRequest>

Response (namespaces removed for clarity)

<QueryServicesResponse>
  <QueryServicesResult>
    <scheduleStartDate>2016-08-27</scheduleStartDate>
      <serviceList>
        <service>
          <rid>201608275100450</rid>
          <uid>C72934</uid>
          <trainid>1V49</trainid>
          <rsid>XC456700</rsid>
          <originName>Manchester Piccadilly</originName>
          <originCrs>MAN</originCrs>
          <destinationName>Birmingham New Street</destinationName>
          <destinationCrs>BHM</destinationCrs>
          <scheduledDeparture>2016-08-27T09:07:00</scheduledDeparture>
          <scheduledArrival>2016-08-27T10:34:00</scheduledArrival>
        </service>
      </serviceList>
  </QueryServicesResult>
</QueryServicesResponse>

--
RailAleFan
Now "safe for work" @ http://live-departures.info/rail/


--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-talk+unsubscribe@googlegroups.com.
To post to this group, send email to openraildata-talk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages