WS_Market
Click here for a complete list of operations.
getTaiTrainCarClass
回傳格式回傳值 說明 BinraryTrainType 台鐵車種mask CarClassName
火車種類名稱 Order 火車種類排序
回傳範例
[ { "BinraryTrainType":32769, "CarClassName":"自強號", "Order":1 }, { "BinraryTrainType":2, "CarClassName":"PP自強號", "Order":2 }, { "BinraryTrainType":4, "CarClassName":"太魯閣號", "Order":3 }, { "BinraryTrainType":8, "CarClassName":"普悠瑪號", "Order":4 }, { "BinraryTrainType":16, "CarClassName":"莒光號", "Order":5 }, { "BinraryTrainType":32, "CarClassName":"復興號", "Order":6 }, { "BinraryTrainType":256, "CarClassName":"區間快車", "Order":7 }, { "BinraryTrainType":128, "CarClassName":"區間車", "Order":8 }, { "BinraryTrainType":512, "CarClassName":"普快車", "Order":9 }, { "BinraryTrainType":8192, "CarClassName":"林鐵區間車", "Order":10 }, { "BinraryTrainType":16384, "CarClassName":"阿里山號", "Order":11 } ]
Test
The test form is only available for requests from the local machine.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /WS_Market.asmx HTTP/1.1 Host: transittw.localking.com.tw Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.gotcha.com.tw/WS_Transit/getTaiTrainCarClass" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <AuthHeaderMarket xmlns="http://www.gotcha.com.tw/WS_Transit"> <Username>string</Username> <HashKey>string</HashKey> <Password>string</Password> </AuthHeaderMarket> </soap:Header> <soap:Body> <getTaiTrainCarClass xmlns="http://www.gotcha.com.tw/WS_Transit" /> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getTaiTrainCarClassResponse xmlns="http://www.gotcha.com.tw/WS_Transit"> <getTaiTrainCarClassResult>string</getTaiTrainCarClassResult> </getTaiTrainCarClassResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /WS_Market.asmx HTTP/1.1 Host: transittw.localking.com.tw Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Header> <AuthHeaderMarket xmlns="http://www.gotcha.com.tw/WS_Transit"> <Username>string</Username> <HashKey>string</HashKey> <Password>string</Password> </AuthHeaderMarket> </soap12:Header> <soap12:Body> <getTaiTrainCarClass xmlns="http://www.gotcha.com.tw/WS_Transit" /> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <getTaiTrainCarClassResponse xmlns="http://www.gotcha.com.tw/WS_Transit"> <getTaiTrainCarClassResult>string</getTaiTrainCarClassResult> </getTaiTrainCarClassResponse> </soap12:Body> </soap12:Envelope>