Difference between revisions of "OpenLDBWS SOAP Query Raw"

From Open Rail Data Wiki
Jump to navigation Jump to search
(Add instructions on using Postman to access the API)
 
m (Added category)
Line 25: Line 25:
  
 
Click 'Send' and the result of the GetDepartureBoardResponse query will be returned.
 
Click 'Send' and the result of the GetDepartureBoardResponse query will be returned.
 +
 +
[[Category:National Rail Enquiries Data Feeds]]

Revision as of 20:55, 11 July 2015

Sending a SOAP query manually isn't useful in a production environment, but can be very useful in a development context. You're able to check that your token is valid, and see the raw response that the server returns.

Using Postman

Postman is an extension for Google Chrome which allows manual interaction with a variety of APIs.

To use the OpenLDBWS API with Postman, send the following raw data in XML (text/xml) format as a POST (not a GET) query to the endpoint at https://lite.realtime.nationalrail.co.uk/OpenLDBWS/ldb6.asmx:

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://thalesgroup.com/RTTI/2014-02-20/ldb/" xmlns:ns2="http://thalesgroup.com/RTTI/2010-11-01/ldb/commontypes">
  <SOAP-ENV:Header>
    <ns2:AccessToken>
      <ns2:TokenValue>*** YOUR TOKEN GOES HERE ***</ns2:TokenValue>
    </ns2:AccessToken>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:GetDepartureBoardRequest>
      <ns1:numRows>10</ns1:numRows>
      <ns1:crs>MAN</ns1:crs>
    </ns1:GetDepartureBoardRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Click 'Send' and the result of the GetDepartureBoardResponse query will be returned.