I have access to the following web service but always retreive the
same error:-
Array
(
[faultcode] =soapenv:Server .userException
[faultstring] =se.brodit.ws.I nvalidUserExcep tion
[detail] =Array
(
[hostname] =webserver
)
)
This is the following code (taken from numerous examples)
// Pull in the NuSOAP code
require_once('n usoap/nusoap.php');
$serverpath ='http://www.brodit.se/';
$wsdl = $serverpath . 'Brodit/wsdl/WebService.wsdl ';
$param = array(
'userId' ='xxxxxxxx'
);
// Create the client instance
$client = new soapclient($wsd l, true);
// Check for an error
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructo r error</h2><pre>' . $err . '</pre>';
// At this point, you know the call that follows will fail
}
// Call the SOAP method
$result = $client->call('getBrand types', $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
same error:-
Array
(
[faultcode] =soapenv:Server .userException
[faultstring] =se.brodit.ws.I nvalidUserExcep tion
[detail] =Array
(
[hostname] =webserver
)
)
This is the following code (taken from numerous examples)
// Pull in the NuSOAP code
require_once('n usoap/nusoap.php');
$serverpath ='http://www.brodit.se/';
$wsdl = $serverpath . 'Brodit/wsdl/WebService.wsdl ';
$param = array(
'userId' ='xxxxxxxx'
);
// Create the client instance
$client = new soapclient($wsd l, true);
// Check for an error
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Constructo r error</h2><pre>' . $err . '</pre>';
// At this point, you know the call that follows will fail
}
// Call the SOAP method
$result = $client->call('getBrand types', $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
Comment