Malformed WSDL causing XML parsing failure - National Rail Journey Planning API

33 views
Skip to first unread message

Paul Absmanner

unread,
Mar 17, 2026, 8:49:26 AM (3 days ago) Mar 17
to A gathering place for the Open Rail Data community
Issue Summary:

Our production system is sometimes experiencing failures when attempting to connect to the National Rail Journey Planning SOAP API. The WSDL file at https://ojp.nationalrail.co.uk/webservices/jpdlr.wsdl contains invalid XML syntax that prevents SOAP clients from initializing.

Technical Details:
  • Error: XMLSyntaxError: EntityRef: expecting ';', line 30, column 73
  • Location: Line 30, column 73 of the WSDL document
  • Root Cause: The WSDL contains an unescaped special character (likely an ampersand & that should be & or similar XML entity)
  • Impact: Cannot initialize SOAP client - all journey planning requests are failing
  • Library: Python zeep/lxml XML parser (industry-standard SOAP client)

What's Wrong:
The WSDL file hosted by National Rail contains malformed XML. When our SOAP client attempts to parse the WSDL to understand the API interface, the XML parser fails because of invalid entity references at line 30, column 73 of the document.

Evidence:
Full stack trace shows the error occurs during WSDL document parsing, before any API calls are made:
File "/usr/local/lib/python3.14/site-packages/zeep/wsdl/wsdl.py", line 149, in _get_xml_document
File "/usr/local/lib/python3.14/site-packages/zeep/loader.py", line 90, in load_external
lxml.etree.XMLSyntaxError: EntityRef: expecting ';', line 30, column 73


Request:
Could someone please help direct me to the appropriate National Rail technical support contact or issue reporting system to get this WSDL file corrected? Is there an official support channel, or should I report this through a specific portal?

Thank you for any assistance!

Peter Hicks

unread,
Mar 17, 2026, 9:00:17 AM (3 days ago) Mar 17
to openrail...@googlegroups.com
Hi Paul

On Tuesday, 17 March 2026 at 12:49, 'Paul Absmanner' via A gathering place for the Open Rail Data community <openrail...@googlegroups.com> wrote:

Our production system is sometimes experiencing failures when attempting to connect to the National Rail Journey Planning SOAP API. The WSDL file at https://ojp.nationalrail.co.uk/webservices/jpdlr.wsdl contains invalid XML syntax that prevents SOAP clients from initializing.

The OJP isn't 'open' (but available under not terribly restrictive terms/pricing) so it's technically off-topic for this group - but I'm aware that https://www.nationalrail.co.uk/developers/online-journey-planner-data-feeds/ points to this group for unofficial support.

However, you can protect yourself against unavailability of the WSDL by keeping a copy locally and using that to bootstrap your clients.  Even better than that, you could create your WSDL client during your build process and guarantee that your code is correct against a specific version of the WSDL.  That said, the WSDL shouldn't really change outside a version.

I know of at least two people at RDG on this group, so I'm hoping by replying, they'll pick this up and escalate it through their own internal channels.

Best wishes,


Peter
Reply all
Reply to author
Forward
0 new messages