RE: [SOAP] soap problems revisited

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

 



Ah, i got it.

SOAP_Client -> asks server

SOAP_Server has a parse error and crashes. If display_errors is set to on on
the server you should see the message.

I tried it, having display_errors set to on on the server, SOAP is not
installed on the server and i get

Notice: Undefined variable:  options in C:\TEMP\test_soap_client.php on line
14

Call Stack:
    0.0000          0   1. {main}() C:\TEMP\test_soap_client.php:0
Failed: <br />
<b>Warning</b>:  main(SOAP/Server.php) [<a
href='http://www.php.net/function.main'>function.main</a>]: failed to create
stream: No such file or direct
ory in <b>C:\websites\caladan\web\test_soap.php</b> on line <b>2</b><br />
<br />
<b>Fatal error</b>:  main() [<a
href='http://www.php.net/function.main'>function.main</a>]: Failed opening
required 'SOAP/Server.php' (include_path='.
;c:\php\pear;xxx') in <b>C:\xxxtest_soap.php</b> on line <b>2</b><br />

I had similar problems doing XML_RPC calls, always ending up in a conf
problem.

hth,

Arnaud.

> Actually, no only for the server.  The following server 
> script will halt
> without any output or php error.  The client receives no 
> response data,
> when the expected error would be something like:
> 
> Fatal error: Cannot instantiate non-existent class:  b in
> .../public_html/server.php on line 12
> 
> Try:
> 
> ****** [server.php]
> 
> <?php
> require_once 'SOAP/Server.php';
> 
> error_reporting(E_ALL);
> 
> class A
> {
>     function methodA(){ return 0; }
> }
> 
> class SOAP_Example_Server {
>     function echoString($inputString)
>     {
>         // Script will die without error here
>         $a = new B;
> 
> //        // Calling a non-existant method on a valid object also 
> //        // causes the script to die without an error
> //        $a = new A;
> //        $a->methodA();
> 
>         return $inputString;
>     }
> }
> 
> $server =& new SOAP_Server;
> $soapclass =& new SOAP_Example_Server();
> $server->addObjectMap($soapclass,'urn:SOAP_Example_Server');
> 
> $server->service($HTTP_RAW_POST_DATA);
> ?>
> 
> ****** [client.php]
> 
> <?php
> include("SOAP/Client.php");
> 
> $soapclient =& new SOAP_Client("http://localhost/server.php";);
> 
> // this namespace is the same as declared in server.php $options =
> array('namespace' => 'urn:SOAP_Example_Server',
>                  'trace' => 1);
> 
> 
> $ret = $soapclient->call("echoString",
>                         $params = array("inputString"=>
>                                         "this is a test"),
>                         $options);
> 
> if (PEAR::isError($ret))
> {
>     echo "Failed: " . $ret->getMessage();
>     echo "\n" . $soapclient->__get_wire();
> }
> else
> {
>     echo $ret;
> }
> ?>
> 
> 
> > -----Original Message-----
> > From: Arnaud Limbourg [mailto:arnaud.limbourg@club-internet.fr]
> > Sent: Thursday, 28 August 2003 3:26 PM
> > To: soap@lists.php.net
> > Subject: Re: [SOAP] soap problems revisited
> > 
> > 
> > You mean,
> > 
> > $client = new SOAP_Client;
> > 
> > require_once 'SOAP/CLient.php';
> > 
> > ?
> > 
> > php soap_cli.php
> >  
> > Fatal error: Cannot instantiate non-existent class:
> > soap_client in soap_cli.php on line 3
> > 
> > With the code above. Please check your php.ini display_errors
> > setting and/or error_reporting (php.ini too)
> > 
> > Arnaud.
> > 
> 
> -- 
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux