#42223 [NEW]: SoapServer truncates XML document if Server Class includes UTF8 file

From: Date: Mon, 06 Aug 2007 19:33:52 +0000
Subject: #42223 [NEW]: SoapServer truncates XML document if Server Class includes UTF8 file
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115811@lists.php.net to get a copy of this message
From:             j8859 at clix dot pt
Operating system: Linux
PHP version:      5.2.4RC1
PHP Bug Type:     SOAP related
Bug description:  SoapServer truncates XML document if Server Class includes UTF8 file

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 bug report at http://bugs.php.net/?id=42223&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42223&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42223&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42223&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42223&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=42223&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42223&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42223&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42223&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42223&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42223&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=42223&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=42223&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42223&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42223&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42223&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42223&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42223&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42223&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42223&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42223&r=mysqlcfg


Thread (4 messages)

« previous php.bugs (#115811) next »