ID: 42488 Updated by: [EMAIL PROTECTED] Reported By: edman007 at edman007 dot com -Status: Assigned +Status: Closed Bug Type: SOAP related Operating System: Linux PHP Version: 5.2.4 Assigned To: dmitry New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-09-03 10:03:41] [EMAIL PROTECTED] Assigned to the SOAP maintainer. ------------------------------------------------------------------------ [2007-08-31 15:21:46] edman007 at edman007 dot com Actually i'm using the snapshot from yesterday (about 12 hours before the php 5.2.4 release), last night after i submitted the bug something changed the version to 5.2.4, and i even got my email to prove that i put the snap down as what i was using in the original report Operating system: Linux PHP version: 5CVS-2007-08-30 (snap) PHP Bug Type: SOAP related Bug description: SoapServer reports an encoding error and the error itself breaks the phpinfo() says its PHP Version 5.2.5-dev ------------------------------------------------------------------------ [2007-08-31 15:03:56] [EMAIL PROTECTED] And are you really using PHP 5.2.4 (released yesterday) ? ------------------------------------------------------------------------ [2007-08-30 14:15:12] edman007 at edman007 dot com Description: ------------ when a function passes a string that is not UTF-8 compliant back to SoapServer as part of a response SoapServer throws and error saying (or i guess its suppose to) that it could not encode it. However the error message reports the error message itself, not the problematic string as the cause of the error, and then finishes off with a small portion of the problematic string, resulting in a very hard to understand error message that also does not really say where it failed. Reproduce code: --------------- ---client.php-- <?php ini_set('soap.wsdl_cache_enabled', 0); $soap = new SoapClient('./something.wsdl'); try { echo $soap->getBadUTF(); } catch (SoapFault $e){ echo $e->faultstring; } ?> ---server.php--- <?php ini_set('soap.wsdl_cache_enabled', 0); $soap = new SoapServer('./something.wsdl'); function getBadUTF(){ return "stuff\x93thing"; } $soap->addFunction('getBadUTF'); $soap->handle(); ?> ---something.wsdl--- <?xml version="1.0"?> <wsdl:definitions name="OSCAdmin" targetNamespace="http://www.example.com/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://www.example.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <wsdl:message name="getBadUTF"> <wsdl:part name="out" type="xsd:string"/> </wsdl:message> <wsdl:portType name="demoPortType"> <wsdl:operation name="getBadUTF"> <wsdl:output message="tns:getBadUTF"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="demoSoapBinding" type="tns:demoPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getBadUTF"> <soap:operation soapAction=""/> <wsdl:output name="out"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="demoService"> <wsdl:port name="demoPort" binding="tns:demoSoapBinding"> <soap:address location="http://localhost/server.php"/> </wsdl:port> </wsdl:service> </wsdl:definitions> Expected result: ---------------- SOAP-ERROR: Encoding: string 'stuff"thing' Actual result: -------------- SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'SOAP-ERROR: Encoding: string 'st ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42488&edit=1
