I'm completely new to SOAP and been searching for an answer a good while so hope someone here could help. I need to search a site set up with .NET and return the results to the site I built in PHP/MySQL. I can get the response back from the server after increasing the memory limit and execution time quite a bit. As I don't really understand this yet I can't say for sure but to me the SOAP server code doesn't look correctly formatted. Anyway what I need to do is to be able to search properties for say, number of bedrooms. and then spit out a list of these in HTML.
Any pointers in the right direction most appreciated! Here's my code so far:
<?php
ini_set("memory_limit","200M");
ini_set("max_execution_time", "50");
require_once('../lib/nusoap.php');
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
$useCURL = isset($_POST['usecurl']) ? $_POST['usecurl'] : '0';
$client = new nusoap_client("http://www.qualitydevelopments.com/QualityGroupService.asmx?WSDL", true,
$proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
exit();
}
$client->setUseCurl($useCURL);
$client->useHTTPPersistentConnection();
$params = array(
'Type' => '19',
'Bedrooms' => '4',
'Visible' => '1'
);
$result = $client->call('GetQGProperties',array($params));
if ($client->fault) {
echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>';
} else {
$err = $client->getError();
if ($err) {
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
?>
|