NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
I Have a PHP Nusoap Problem.


Joined: 16 Dec 2009
Posts: 1
Reply with quote
Hi. I use nusoap client. But have a fault. Sad
Array
(
[faultcode] => soap:server
[faultstring] => Server was unable to process request. ---> Object reference not set to an instance of an object.
[detail] =>
)

Help.please. Confused

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>';
?>
View user's profileFind all posts by yorgi17nuspSend private message
I Have a PHP Nusoap Problem.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic