NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problem with HTTP Authentication


Joined: 26 Nov 2006
Posts: 1
Reply with quote
Hello every body. I have problem with HTTP authentication soap client does not run. This is my code.
Soapserver:
<?php
require_once('nusoap.php');
define('HOST_NAME','localhost');
define('USER_NAME','root');
define('PASSWORD','');
define('NS','http://10.0.0.194/webservice/');
function test($value)
{
return $value;
}
$server = new nusoap_server();

$server->configureWSDL('CDT_SERVICE',NS);
$server->wsdl->schemaTargetNamespace=NS;
$server->register('test',array('value'=>'xsd:int'),array('result'=>'xsd:int'),NS);
$HTTP_RAW_POST_DATA = (isset($HTTP_RAW_POST_DATA)) ? $HTTP_RAW_POST_DATA :'';
$server->service($HTTP_RAW_POST_DATA);
?>
Soapclient
<?php
require_once('nusoap.php');
define('CDT','http://10.0.0.194/webservice/webservice.php?wsdl');
$soapclient = new nusoapclient(CDT,'wsdl');
//check_user if http authentication request
$soapclient ->setCredentials('admin','YWG41BPzVAkN6');
$x=$soapclient ->call('test',array('value'=>6));
echo "Value: ".$x
?>
If i remove Http authentication soapclient run successfully. Please help me!.
View user's profileFind all posts by thiendvSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
how did you add httpauthentication on the server? Is it digest or basic or something else?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Problem with HTTP Authentication
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