OpenLDBWS SOAP Query Raw: Difference between revisions

From Open Rail Data Wiki
Add instructions on using Postman to access the API
 
m add wikilink
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
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.
Sending a [[About SOAP|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 ==
== Using Postman ==
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]]

Latest revision as of 14:17, 25 June 2022

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.