#36854 [Fbk->Opn]: SOAP Server cannot issue a SoapFault when a SoapClient is created
| From: | markslemko at gmail dot com | Date: | Mon, 27 Mar 2006 16:32:29 +0000 |
| Subject: | #36854 [Fbk->Opn]: SOAP Server cannot issue a SoapFault when a SoapClient is created | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-94928@lists.php.net to get a copy of this message | ||
ID: 36854
User updated by: markslemko at gmail dot com
Reported By: markslemko at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: SOAP related
Operating System: sever 2003 & Open BSD
PHP Version: 5.1.2
New Comment:
It is working on the latest CVS snapshot!
Thanks!
Previous Comments:
------------------------------------------------------------------------
[2006-03-26 00:44:44] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
------------------------------------------------------------------------
[2006-03-25 01:13:34] markslemko at gmail dot com
Description:
------------
I am trying to use a SOAP client within a SOAP server and it caused the
SOAP server to fail to respond properly to its clients with a SoapFault
when a problem arose. It works fine if there is no error to return to
the client.
so a diagram might help...
[SOAP Client A]
|
|
[SOAP Server A]
+[SOAP Client B] ---> [SOAP Server B]
+[return SoapFault]
...looks like we got no XML document...
The response (SoapFault) to the SOAP Client A looks like it is empty.
I'm wondering if the SoapFault mechanism is corrupted by the SoapClient
initialization. I've tested the idea of faking a response from the SOAP
Server B, i.e. don't create a SOAP Client B, and the returning
SoapFault works as expected.
Reproduce code:
---------------
// code snippets to get help my issue accross
$server = new SoapServer(null,array('uri'=>$NAMESPACE));
$server->setClass('MyClass');
$server->handle();
// a class that creates a soap client within the server
class MyClass {
public function Make($something) {
$client = new SoapClient('http://somewhere.com/soap.wsdl');
return new SoapFault('Validation','bogus');
}
}
// -- another file -- an originating client
try {
$clientA = new soapClient('http://localhost/soap.php');
} catch (SoapFault $e) {
echo $e->faultstring; // error occurs here. wrong error message =>
expected "bogus"
}
Expected result:
----------------
expected the message "bogus" to be echoed
expect to catch a SoapFault with an error message on the originating
client (Client A above).
Actual result:
--------------
looks like we got no XML document
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36854&edit=1