Hi. I use nusoap client. But have a fault.
Array
(
[faultcode] => soap:server
[faultstring] => Server was unable to process request. ---> Object reference not set to an instance of an object.
[detail] =>
)
Help.please.
My nusoap client php code here.
<?php
$ns = "https://sonucservis.osym.gov.tr";
require_once('../lib/nusoap.php'); // nusoap-0.7.3
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
$client = new nusoap_client('https://sonucservis.osym.gov.tr/service.asmx?wsdl', 'wsdl', $proxyhost, $proxyport, $proxyusername, $proxypassword);
$client->soap_defencoding = 'UTF-8';
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$header = '<AuthenticationHeader xmlns="'.$ns.'"><KullaniciAdi>......</KullaniciAdi><Sifre>....</Sifre></AuthenticationHeader>';
$client->setHeaders($header);
$err = $client->getError();
$parameters['parameters']['SinavId'] = "....";
$parameters['parameters']['SinavYili'] = "....";
$parameters['parameters']['SinavDonemi'] = "....";
$parameters['parameters']['TcKimlikNo'] = ".....";
$result = $client->call('SonucGetir', $parameters, $ns, 'https://sonucservis.osym.gov.tr/SonucGetir', false, true);
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result
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->debug_str, ENT_QUOTES) . '</pre>';
?>