|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-26 00:44 UTC] tony2001@php.net
[2006-03-27 18:32 UTC] markslemko at gmail dot com
[2006-03-27 18:40 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 12:00:01 2025 UTC |
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