我从供应商 API 获得以下信息:
我需要使用 php 创建一个 Soap 调用。我该怎么做呢?到目前为止,我有这个:但它不起作用:
private function booking_soap_connect() {
// the wsdl URL of your service to test
$serviceWsdl = 'https://apitest.com/bookingapi.asmx?WSDL';
// the parmeters to initialize the client with
$serviceParams = array(
'login' => 'un',
'password' => 'pw'
);
// create the SOAP client
$client = new SoapClient($serviceWsdl, $serviceParams);
$data['Brand'] = "All";
$data['TourCode'] = "QBE";
$data['DepartureCode'] = "8000321";
$data['VendorId'] = "test";
$data['VendorPassword'] = "test";
$results = $client->GVI_DepartureInfo($data)
echo $results;
}
请帮忙