php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31993 SoapServer::handle() stops the script
Submitted: 2005-02-16 09:39 UTC Modified: 2005-06-28 01:00 UTC
Votes:6
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:2 (40.0%)
From: cfendt at silicom dot fr Assigned: dmitry (profile)
Status: No Feedback Package: SOAP related
PHP Version: 5CVS-2005-03-29 OS: WinXp, Mac OS X
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 - 33 = ?
Subscribe to this entry?

 
 [2005-02-16 09:39 UTC] cfendt at silicom dot fr
Description:
------------
Hello,

I try to make some DB work after a SoapServer::handle()... but the script ends!

on the output, we can see the soapFault dump, but no "<!-- Alive!!!! -->"...

I try it on Win 5.0.1, Win 5.0.3, Win 5.0-CVS (15/2/2005), Win 5.1-CVS (15/2/2005), OS X 5.0.1 (build from source), OS X 5.0.3 (build from source)

Reproduce code:
---------------
<?php
  $server = new SoapServer(null, 
    array('uri' => "http://test-uri/"));
  $server->handle("");
  echo "\r\n<!-- Alive!!!! -->\r\n";
?>

Expected result:
----------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode>SOAP-ENV:Server</faultcode>
      <faultstring>Bad Request</faultstring>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Alive!!!! -->

Actual result:
--------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode>SOAP-ENV:Server</faultcode>
      <faultstring>Bad Request</faultstring>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-17 09:53 UTC] cfendt at silicom dot fr
In fact, I use a WSDL file...

CODE :

<?php
class web_service {
  function sayHello($input) {
    return "Hello, ".$input."...";
  }
}

$soap_query =
   "<soapenv:Envelope
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>"
 . "  <soapenv:Body>"
 . "    <m:sayHello xmlns:m='http://localhost/test.php'>"
 . "      <m:login>toto</m:login>"
 . "    </m:sayHello>"
 . "  </soapenv:Body>"
 . "</soapenv:Envelope>";

$server = new SoapServer("./test.wsdl");
$server->setclass("web_service");
$server->handle($soap_query);
echo "\r\nAlive!!!!\r\n";
$server->handle("");
echo "\r\nAlive!!!!\r\n";
?>

WSDL :

<?xml version="1.0"?>
<wsdl:definitions
       xmlns:tns="urn:TEST"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:typens="urn:TEST"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
           xmlns="http://schemas.xmlsoap.org/wsdl/"
 targetNamespace="urn:TEST"
            name="TEST">
	<message name="sayHelloInputMessage">
		<part name="login"       type="xsd:string"/>
	</message>
	<message name="sayHelloOutputMessage">
		<part name="hello"       type="xsd:string"/>
	</message>
	<portType name="TESTPorts">
		<operation name="sayHello">
			<input  message="typens:sayHelloInputMessage"/>
			<output message="typens:sayHelloOutputMessage"/>
		</operation>
	</portType>
	<binding name="TESTBinding" type="typens:TESTPorts">
		<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="sayHello">
			<soap:operation soapAction="http://localhost/test.php"/>
			<input ><soap:body use="literal"/></input >
			<output><soap:body use="literal"/></output>
		</operation>
	</binding>
	<service name="TESTWebService">
		<documentation>TEST WebService</documentation>
		<port name="TESTPorts" binding="typens:TESTBinding">
			<soap:address location="http://localhost/test.php"/>
		</port>
	</service>
</wsdl:definitions>

RESULT :

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:sayHelloResponse>
      <hello>Hello, toto...</hello>
    </SOAP-ENV:sayHelloResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Alive!!!!
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode>SOAP-ENV:Server</faultcode>
      <faultstring>Bad Request</faultstring>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

When the query is good => no problem
The probleme is due to the SoapFault...
I tried to catch SoapFault... but without result...
try {
  $server->handle("");
} catch (SoapFault $fault) {
  echo "SoapFault";
}

I don't know what is the more switable: never stop the process, or throw Exception...

Regards,

FENDT Charles
 [2005-03-25 01:22 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-03-29 13:47 UTC] cfendt at silicom dot fr
The script always stops when a soapfault is raised...
No catch possible...
 [2005-03-29 17:41 UTC] sniper@php.net
Assigning back to Dmitry.

 [2005-06-20 10:55 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-06-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 11:01:29 2024 UTC