nusoap service + php5 soap client problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have this nusoap service:

$server= new soap_server();
$server->register('authenticate_user', array(), array());

// Initialize WSDL support
$server->configureWSDL('authenticate', 'urn:authenticate');
// Register the method to expose
$server->register('authenticate_user',                  // method name
    array('key' => 'xsd:string','params'=>'xsd:array'), // input parameters
    array('return' => 'xsd:array'),                     // output parameters
    'urn:authenticate',                                 // namespace
    'urn:authenticate#authenticate_user',               // soapaction
    'rpc',                                              // style
    'encoded',                                          // use
    'Authenticates User'                      // documentation
);

function authenticate_user($key=null,$params=null){
    $data['message']=true;
    $data['key']=$key;
    $data['params']=$params;
     return $data;
}

/* "start" the service */
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);


I then have a php5 box calling the service:


$client = new SoapClient("http://mysite.com/authenticate.php?wsdl";);
$return=$client->authenticate_user("fdsfds",array("username"=>"mynameis","password"=>"fred"));

Problem is, it throws an error of:

*Fatal error*: Uncaught SoapFault exception: [HTTP] Unable to parse URL in
/var/www/mysite/html/webservices/test_authenticate_service.php:9 Stack
trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...',
'http:///~me...', 'urn:authenticat...', 1, 0) #1 [internal function]:
SoapClient->__call('authenticate_us...', Array) #2
/var/www/mysite/html/webservices/test_authenticate_service.php(9):
SoapClient->authenticate_user('fdsfds', Array) #3 {main} thrown in *
/var/www/mysite/html/webservices/test_authenticate_service.php* on line *9

How can I fix this?

Thanks!
*

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux