ID: 31993 Updated by: [EMAIL PROTECTED] Reported By: cfendt at silicom dot fr -Status: Open +Status: Assigned Bug Type: SOAP related Operating System: WinXp, Mac OS X -PHP Version: 5.0.3 +PHP Version: 5CVS-2005-03-29 Assigned To: dmitry New Comment:
Assigning back to Dmitry. Previous Comments: ------------------------------------------------------------------------ [2005-03-29 13:47:23] cfendt at silicom dot fr The script always stops when a soapfault is raised... No catch possible... ------------------------------------------------------------------------ [2005-03-25 01:22:25] [EMAIL PROTECTED] 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-02-17 09:53:21] 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-02-16 09:39:31] 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> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31993&edit=1