You are here: webservies, wsdl and nuspoap. Please help « PHP Language « IT news, forums, messages
webservies, wsdl and nuspoap. Please help

Posted by craigyk on 04/23/07 13:30

I have access to the following web service but always retreive the
same error:-

Array
(
[faultcode] => soapenv:Server.userException
[faultstring] => se.brodit.ws.InvalidUserException
[detail] => Array
(
[hostname] => webserver
)


)


This is the following code (taken from numerous examples)


// Pull in the NuSOAP code
require_once('nusoap/nusoap.php');


$serverpath ='http://www.brodit.se/';
$wsdl = $serverpath . 'Brodit/wsdl/WebService.wsdl';
$param = array(
'userId' => 'xxxxxxxx'
);


// Create the client instance
$client = new soapclient($wsdl, true);
// Check for an error
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
// At this point, you know the call that follows will fail


}


// Call the SOAP method
$result = $client->call('getBrandtypes', $param);
// 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>';
}


}


any help would be grateful. many thanks

craig

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация