xI尝试创建一个SOAP客户端并使用以下代码但是当我调用服务器时我什么都没有,我应该怎样做才能运行请求并获得结果,
<?php
require_once "lib/nusoap.php";
$client = new nusoap_client("http://test.gsisservices.com:7010/GServices/WSHOT-PS?wsdl", true);
$pramas = array("Version" => "1",
"AvailRequestSegments" => array(
"AvailRequestSegment" => array(
"StayDateRange" => array("Start" => "2015-10-20", "End" => "2015-10-25"),
"RoomStayCandidates" => array(
"RoomStayCandidate" => array(
"GuestCounts" => array("GuestCount" => array("Count" => "1", "Age" => "30")),
"GuestCounts" => array("GuestCount" => array("Count" => "1", "Age" => "12")))),
"HotelSearchCriteria" => array(
"Criterion" => array(
"HotelRef" => array("SegmentCategoryCode" => "3"))),
"TPA_Extensions" => array(
"Providers" => array(
"Provider" = array("Provider" => "GSI",
"Credentials" => array(
"CredentialCode" => array("CredentialCode" => "xxxxxxxxx", "CredentialName" => "AccountCode"),
"CredentialCode" => array("CredentialCode" => "xxxxxxxxx", "CredentialName" => "Password"),
"CredentialCode" => array("CredentialCode" => "", "CredentialName" => "System"),
"CredentialCode" => array("CredentialCode" => "", "CredentialName" => "SalesChannel"),
"CredentialCode" => array("CredentialCode" => "", "CredentialName" => "Language"),
"CredentialCode" => array("CredentialCode" => "", "CredentialName" => "ConnectionString")
),
"ProviderAreas" => array(
"Area" => array("TypeCode" => "Country", "AreaCode" => "ES"),
"Area" => array("TypeCode" => "Province", "AreaCode" => "ES011")
)
)
),
"ProviderTokens" => array(
"Token" => array("TokenName" => "ResponseMode", "TokenCode" => "4")
)
)
)
);
$hotel = $client->call("OTA_HotelAvail", $pramas);
$error = $client->getError();
if ($error) {
echo "<h2>Constructor error</h2><pre>" . $error . "</pre>";
}
if ($client->fault) {
echo "<h2>Fault</h2><pre>";
print_r($hotel);
echo "</pre>";
}else {
$error = $client->getError();
if ($error) {
echo "<h2>Error</h2><pre>" . $error . "</pre>";
}
else {
var_dump($hotel);
}
}
echo "sss";
?>
我尝试创建一个SOAP客户端并使用以下代码但是当我调用服务器时我什么都没得到,我应该怎样做才能运行请求并获得结果,