ID: 42223 Updated by: [EMAIL PROTECTED] Reported By: j8859 at clix dot pt -Status: Assigned +Status: Bogus Bug Type: SOAP related Operating System: Linux PHP Version: 5.2.4RC1 Assigned To: dmitry New Comment:
Just look into util-UTF8.php and remove first three bytes. It seems like a UTF-8 prefix for some Windows editor. Previous Comments: ------------------------------------------------------------------------ [2007-08-06 19:33:52] j8859 at clix dot pt Description: ------------ SoapServer truncates XML document if the Server Class includes a UTF8 file. The error only occurs if the XML document returned is larger than 8000 bytes. In this case, tha XML document is truncated in the last 3 bytes. The BOM [Byte-Order Mark] also is 3 bytes long, could it be related with the bug? Reproduce code: --------------- There are a lot of files involved. Download them from: http://web.ioio.info/wstest/wstest.zip You can see the bug here: http://web.ioio.info/wstest/client.php You can download the ZIP file, extract it to an Apache directory, correct all addresses: change "web.ioio.info/wstest" for your own address in all files, and try the following in the TestWS.php file: 1) uncomment [require_once "util-ANSI.php";] comment [require_once "util-UTF8.php";] -> The error doesn't occur 2) On line 14, replace "800" by "700" (the XML document will be smaller than 8000 bytes) -> The error doesn't occur Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:testResponse><return xsi:type="xsd:string">0123456789 ...(800 times: 0123456789)... 0123456789</return></SOAP-ENV:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> Actual result: -------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:testResponse><return xsi:type="xsd:string">0123456789 ...(800 times: 0123456789)... 0123456789</return></SOAP-ENV:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelop -> Misses the last 3 chars: "e>\n" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42223&edit=1