php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36854 SOAP Server cannot issue a SoapFault when a SoapClient is created
Submitted: 2006-03-25 01:13 UTC Modified: 2006-03-27 18:40 UTC
From: markslemko at gmail dot com Assigned:
Status: Closed Package: SOAP related
PHP Version: 5.1.2 OS: sever 2003 & Open BSD
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: markslemko at gmail dot com
New email:
PHP Version: OS:

 

 [2006-03-25 01:13 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-26 00:44 UTC] 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-27 18:32 UTC] markslemko at gmail dot com
It is working on the latest CVS snapshot! 
Thanks!
 [2006-03-27 18:40 UTC] tony2001@php.net
Works -> closed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 07:01:28 2025 UTC