php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50895 Fatal error: SOAP-ERROR: Encoding: Violation of encoding rules
Submitted: 2010-02-01 09:37 UTC Modified: 2010-12-03 17:46 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jitka at darbujanova dot cz Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.12 OS: Windows XP SP3
Private report: No CVE-ID:
 [2010-02-01 09:37 UTC] jitka at darbujanova dot cz
Description:
------------
There should be a possibility to catch this fatal error (it shouldn't be fatal error, only the Exception). 

 Fatal error: SOAP-ERROR: Encoding: Violation of encoding rules in C:\path\Soap\Server.php on line <i>123456789.

So when for example soap client sends string for an integer field, program can react on this by telling which input is wrong in our language....

Reproduce code:
---------------
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ind="http://testserver.local/ws/">
   <soapenv:Header/>
   <soapenv:Body>
      <ind:MyMethod soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <input xsi:type="ind:MyComplexType">
            <myint xsi:type="xsd:int">? or any string</myint>
        </input>
      </ind:MyMethod>
   </soapenv:Body>
</soapenv:Envelope>

Expected result:
----------------
Exception: SOAP-ERROR: Encoding: Violation of encoding rules in xxx.php 

not Fatal Error...

Actual result:
--------------
Fatal error: SOAP-ERROR: Encoding: Violation of encoding rules in Mypath\Soap\Server.php on line 123456

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-01 09:46 UTC] jitka at darbujanova dot cz
I found that my report is copy of this bug report: http://bugs.php.net/bug.php?id=50547. Please comment somebody if this is solving...
 [2010-12-03 17:46 UTC] jani@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-12-03 17:46 UTC] jani@php.net
Duplicate of bug #50547
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 25 07:02:14 2014 UTC