XML error parsing SOAP payload on line 1: Mismatched SOLVED |
|
Hello
I had problems with the error "XML error parsing SOAP payload on line 1: Mismatched tag". After analyzing with Debug () I discovered that the SOAP Response message was truncated in 3 characters, leaving the string "ENV: Envelo" at the end and the characters "pe>" being lost. The error occurred when the BODY had a length greater than 8192 characters. A basic but effective solution: According to what I researched and tested, when the SOAP Response BODY is greater than 8192 characters, the "Content-Length:" value returned in the Response header (incoming_headers ['content-length']) is wrong, it is 3 bytes shorter, so when function getResponse () excecute the fread () function, the variable $ data is truncated at end, Leaving always the string "ENV: Envelo". What the patch does is correct, on client side, the length. The revision of the code should be continued to see, at server side, to know what is wrong in calculating the length. Original Code (Line 3054 in nusoap.php version = '0.9.5'
Patched code:
|
||||||||||||||||
|
Site Admin
|
Can you reproduce the problem with official samples for client and server?
Thanks for the attempt to fix, but this will not go. We can't afford adding arbitrary numbers to the read length. Why 3? Why not 303? From what you posted it looks like either $content_length or $strlen or both have wrong values and therefore fread won't read up to the end of file leave 3 symbols. If that's correct, we need to figure out which one is wrong and why. |
||||||||||||
_________________ The PHP IDE team |
XML error parsing SOAP payload on line 1: Mismatched SOLVED |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by