0
嘗試使用SOAP XML與Postman進行National Rail API調用,但獲取「401 - 未經授權:訪問由於無效憑證而被拒絕」響應。以下是我有:通過Postman進行National Rail SOAP XML API調用
地址欄
POST https://lite.realtime.nationalrail.co.uk/OpenLDBWS/ldb10.asmx
頁眉:
Content-Type: text/xml;charset=UTF-8
SOAPAction: http://thalesgroup.com/RTTI/2017-02-02/ldb/GetDepartureBoard
Accept-encoding: gzip, x-gzip, deflate, x-bzip2
身體:
<soap:Envelope
xmlns:ldb="http://thalesgroup.com/RTTI/2017-02-02/ldb/"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:typ="http://thalesgroup.com/RTTI/2017-02-02/Token/types">
<soap:Header>
<typ:AccessToken>
<typ:TokenValue>**** token removed ****</typ:TokenValue>
</typ:AccessToken>
</soap:Header>
<soap:Body>
<ldb:GetDepartureBoardRequest>
<ldb:crs>LST</ldb:crs>
<ldb:numRows>10</ldb:numRows>
<ldb:timeOffset>0</ldb:timeOffset>
<ldb:timeWindow>120</ldb:timeWindow>
</ldb:GetDepartureBoardRequest>
</soap:Body>
</soap:Envelope>
有些文檔是在這裏:https://lite.realtime.nationalrail.co.uk/openldbws/
例C -111這裏:http://nrodwiki.rockshore.net/index.php/GetDepBoardWithDetails
任何援助,將不勝感激 - 我想知道如何正確地進行API調用,所以我可以用我的業餘愛好項目的應用進展。