Bug #78749 [NEW]: Wrong error message when maxOccurs is exceeded
| From: | tony at marston-home dot demon dot co dot uk | Date: | Thu, 24 Oct 2019 18:29:46 +0000 |
| Subject: | Bug #78749 [NEW]: Wrong error message when maxOccurs is exceeded | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-223453@lists.php.net to get a copy of this message | ||
From: tony at marston-home dot demon dot co dot uk
Operating system: Windows 10
PHP version: 7.3.11
Package: SOAP related
Bug Type: Bug
Bug description:Wrong error message when maxOccurs is exceeded
Description:
------------
In my WSDL I have a complexType entry which has a maxOccurs set to 1. If
I exceed this limit the error message says "SOAP-ERROR: Encoding object
has no 'first_name' property" where 'first_name' is the first required
field in the enclosed structure.
Test script:
---------------
WSDL:
<xsd:complexType name="ArrayOfContactInfo">
<xsd:sequence>
<xsd:element name="contact" type="tns:contact" minOccurs="0"
maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="contact">
<xsd:all>
<xsd:element name="title" type="xsd:string" minOccurs="0"
maxOccurs="1"/>
<xsd:element name="first_name" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="middle_name" type="xsd:string" minOccurs="0"
maxOccurs="1"/>
<xsd:element name="last_name" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
</xsd:all>
</xsd:complexType>
Expected result:
----------------
I expect a more meaningful error message such as "More than N
occurrences exceeded"
Actual result:
--------------
The error message is totally misleading.
--
Edit bug report at https://bugs.php.net/bug.php?id=78749&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78749&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78749&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78749&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78749&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78749&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78749&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78749&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78749&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78749&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78749&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78749&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78749&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78749&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78749&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78749&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78749&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78749&r=mysqlcfg