Manuel Vázquez Acosta
2003-01-13 01:08:30 UTC
Hi all:
Im trying the SOAP components by PEAR. I downloaded the latest SOAP
package in pear.php.net along with the dependency tree.
I made two simple scripts: the client and the server.
The client looks like:
<?php
chdir('./PEAR'); // This chdir is needed in order to satisfy
including in SOAP scripts
// or you have to change include_path in
php.ini.
require_once 'SOAP/Client.php';
// This is a valid local URL in my workstation
$uri = 'http://pear.local/serv.php';
$namespace = 'urn:MySOAPTest';
$client = new SOAP_Client($uri);
$result = $client->call('TheQuestion', array(), $namespace);
print_r( $result );
?>
And the server is:
<?php
class B
{
var $namespace = 'urn:MySOAPTest';
function TheQuestion()
{
return new SOAP_Value('return', 'string', '10 times 10 plus 1?');
}
}
$server = new SOAP_Server();
$server->addObjectMap( new B() );
$server->service($HTTP_RAW_POST_DATA);
?>
I haven't had success in running this. I've got an HTTP 500 Internal
Server Error after 2 or 3 seconds.
I also tried to run the examples that come with SOAP packages and for
each
$soapclient->call() I got the same HTTP Error 500.
My working env is Win-XP Pro/Apache 2.0/PHP 4.2.3.
Any hints will be welcome.
Manu.
Im trying the SOAP components by PEAR. I downloaded the latest SOAP
package in pear.php.net along with the dependency tree.
I made two simple scripts: the client and the server.
The client looks like:
<?php
chdir('./PEAR'); // This chdir is needed in order to satisfy
including in SOAP scripts
// or you have to change include_path in
php.ini.
require_once 'SOAP/Client.php';
// This is a valid local URL in my workstation
$uri = 'http://pear.local/serv.php';
$namespace = 'urn:MySOAPTest';
$client = new SOAP_Client($uri);
$result = $client->call('TheQuestion', array(), $namespace);
print_r( $result );
?>
And the server is:
<?php
class B
{
var $namespace = 'urn:MySOAPTest';
function TheQuestion()
{
return new SOAP_Value('return', 'string', '10 times 10 plus 1?');
}
}
$server = new SOAP_Server();
$server->addObjectMap( new B() );
$server->service($HTTP_RAW_POST_DATA);
?>
I haven't had success in running this. I've got an HTTP 500 Internal
Server Error after 2 or 3 seconds.
I also tried to run the examples that come with SOAP packages and for
each
$soapclient->call() I got the same HTTP Error 500.
My working env is Win-XP Pro/Apache 2.0/PHP 4.2.3.
Any hints will be welcome.
Manu.
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php