In order to test the service, understand how to craft requests and test responses you should download SoapUI. Check/Change the 'Preferences' 'HTTP Settings' so that 'Request Compression' is set to 'None' (Else the server will return a 401 Access denied message), and under 'WSDL Settings' enable 'Sample Values' and 'Include Optional'. Create a new SOAP project and add the WSDL URL (https://lite.realtime.nationalrail.co.uk/OpenLDBWS/wsdl.aspx - for the public version, or https://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/wsdl.aspx - for the staff version) and it will discover all of the exposed services, build your queries, and enter sample data so you gain an understanding of what you need to provide without having to trawl through the schema manually. So far this is the only tool I've found which works across all platforms (Windows, Mac, Linux) which gives consistent results.
This error is common, and can be caused for a variety of reasons:
Token must be correctly formatted
Tokens are in the format nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn, where each 'n' represents a hexadecimal character (0-9 or a-f).
The letters 'A' to 'F' must be lower-case, otherwise the token will not be valid.
Token must be supplied in the SOAP header
The only place the token needs to be specified is within the SOAP envelope in the Header. It must be enclosed in a tag called 'TokenValue', wrapped within the 'AccessToken' tag, like this:
<typ:AccessToken> <typ:TokenValue>nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn</typ:TokenValue> </typ:AccessToken>
The 'typ' namespace must be the 'tokentypes' namespace.
Use a POST request
SOAP requests must be sent using HTTP POST. If you're using an HTTP GET, there will be no token and you will receive a 401 Unauthorized error.
Check Compression Settings
Check you are not sending your requests compresses. In testing with SoapUI the server appears to reject *any* compressed request.
SOAP Fault - Server was unable to process request
If your SOAP request is malformed, you will receive this SOAP fault.
Check that you are using the correct namespace:
- The SOAP Envelope, Header and Body tags must be part of the SOAP namespace (http://schemas.xmlsoap.org/soap/envelope/)
- The AccessToken and TokenValue tags in the SOAP Header tag must be from the Token namespace (http://thalesgroup.com/RTTI/2013-11-28/Token/types, e.g. https://lite.realtime.nationalrail.co.uk/OpenLDBWS/darwin_token_types_2013-11-28.xsd [public] or https://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/darwin_token_types_2013-11-28.wsdl [staff])
- The request in the SOAP Body must be part of the LDB namespace (http://thalesgroup.com/RTTI/YYYY-MM-DD/ldb/, e.g. http://thalesgroup.com/RTTI/2014-02-20/ldb/)
|National Rail Enquiries Data Feeds|
|Data Feeds||About the Feeds • Darwin Webservice (Public) • Darwin Webservice (Staff) • Historical Service Performance • Push Port • KnowledgeBase • DTD • Locations (PoC) • Real Time Journey Planner|
|Push Port||About • XML Schemas • Schedule Data • Association Data • Train Status Data • Station Messages|