Tiger API Soap请求。高度混乱

时间:2014-06-03 08:13:46

标签: php api soap

我在设置Tiger Air API之初就开始了。他们提供了很少的测试网址,但这些似乎不起作用。以下是我收到的详细信息

联系邮箱:

为了进行测试,我们已将此帐户与您的

相关联
xxxxxx agency in TEST (currency SGD).
Username: xxx
P/W: xxx (password will have to be changed on first login)
Domain: xxx
RoleCode: xxx

用于测试连接的API的URL如下:

测试:https://trtestr3xapi.navitaire.com/sessionmanager.svc

要访问各种服务,您需要拨打以下DNS:

测试:https://trtestr3xapi.navitaire.com

SOAP示例请求

上述两个网址似乎根本不起作用。令人惊讶的是,他们没有提供WSDL网址。我收到了他们的样品请求。

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:web="http://schemas.navitaire.com/WebServices" 
    xmlns:ses="http://schemas.navitaire.com/WebServices/ServiceContracts/SessionService" 
    xmlns:ses1="http://schemas.navitaire.com/WebServices/DataContracts/Session"
>
    <soapenv:Header>
        <web:ContractVersion>320</web:ContractVersion>
    </soapenv:Header>
    <soapenv:Body>
        <ses:LogonRequest>
            <!--Optional:-->
            <ses:logonRequestData>
                <!--Optional:-->
                <ses1:DomainCode>EXT</ses1:DomainCode>
                <!--Optional:-->
                <ses1:AgentName>MyAgent</ses1:AgentName>
                <!--Optional:-->
                <ses1:Password>P@ssword</ses1:Password>
                <!--Optional:-->
                <ses1:LocationCode></ses1:LocationCode>
                <!--Optional:-->
                <ses1:RoleCode></ses1:RoleCode>
                <!--Optional:-->
                <ses1:TerminalInfo></ses1:TerminalInfo>
            </ses:logonRequestData>
        </ses:LogonRequest>
    </soapenv:Body>
</soapenv:Envelope>

我很长时间都在苦苦寻找基本的设置但是进入循环。

1 个答案:

答案 0 :(得分:0)

您的服务器IP需要被允许用于此链接上的请求

<?
$Username = 'xxx';
$Password: 'xxx';
$Domain: 'xxx';

$url = "https://trtestr3xapi.navitaire.com/SessionManager.svc?wsdl";
$client = new SoapClient($url);
$params = array(
    'logonRequestData' => array(
        'DomainCode' => $Domain,
        'AgentName' => $Username,
        'Password' => $Password,
    )
);

print_r($client->Logon($params));
?>

另一个有用的代码

<?
$url = "https://trtestr3xapi.navitaire.com/SessionManager.svc?wsdl";
$client = new SoapClient($url);
print_r($client->__getFunctions());
print_r($client->__getTypes());
?>

<?
$url = "https://trtestr3xapi.navitaire.com/BookingManager.svc?wsdl";
$client = new SoapClient($url);
print_r($client->__getFunctions());
print_r($client->__getTypes());
?>