#42223 [Opn->Asn]: SoapServer truncates XML document if Server Class includes UTF8 file

From: Date: Sat, 11 Aug 2007 16:32:17 +0000
Subject: #42223 [Opn->Asn]: SoapServer truncates XML document if Server Class includes UTF8 file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115973@lists.php.net to get a copy of this message
ID: 42223 Updated by: iliaa@php.net Reported By: j8859 at clix dot pt -Status: Open +Status: Assigned Bug Type: SOAP related Operating System: Linux PHP Version: 5.2.4RC1 -Assigned To: +Assigned To: dmitry 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

« previous php.bugs (#115973) next »