我正在开始设置Tiger Air API。他们提供了很少的URL用于测试,但这些似乎不起作用。以下是我从他们那里得到的详细信息
联系邮件:
为了进行测试,我们已将此帐户链接到您的
xxxxxx agency in TEST (currency SGD).
Username: xxx
P/W: xxx (password will have to be changed on first login)
Domain: xxx
RoleCode: xxxAPI用于测试连通性的URL如下:
测试:https://trtestr3xapi.navitaire.com/sessionmanager.svc
要访问各种服务,您需要调用以下DNS:
测试:https://trtestr3xapi.navitaire.com
SOAP示例请求
上面两个URL似乎根本不起作用。令人惊讶的是,他们没有提供WSDL url。我已经收到了他们的样品要求。
<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>我挣扎了很长一段时间,试图弄清楚基本的设置,但陷入了循环。
发布于 2014-06-04 22:20:41
此链接上的请求需要允许您的服务器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());
?>https://stackoverflow.com/questions/24010184
复制相似问题