SOAP related Bug #39832https://bugs.php.net/bug.php?id=39832
[Closed] SOAP Server: parameter not matching the WSDL specified type are set to 0Thu, 14 Dec 2006 12:25:27 +0000Mon, 18 Dec 2006 14:39:45 +0000dmitry@... [2006-12-14 12:25:27]SOAP related Bug
Reported by ebourlon@...
Thu, 14 Dec 2006 12:25:27 +0000
PHP: 5.2.0, OS: Win32
Description:
------------
Assume you have a WSDL including the following ComplexType
<xs:complexType name="MessageInfoType">
<xs:sequence>
<xs:element name="NetworkErrorCode" type="NetworkErrorCodeType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="priority" type="PriorityType"/>
</xs:complexType>
<xs:simpleType name="PriorityType">
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="3"/>
</xs:restriction>
</xs:simpleType>
If you build a SOAP server based on this WSDL and send a SOAP request to it the SOAP server will validate the SOAP request against the WSDL.
In the above example if your request contains a priority attribute containing a string for instance, the expected behaviour would be that the SOAP server raises an exception because the attribute does not match the defined type.
What it does instead is that it will put the priority attribute value to 0 and I don't find any way to find back the fact that a problem with WSDL validation occured.
It is a bug or is it a way at SOAP server code level to know that WSDL validation passed?
Br,
Eric Bourlon
]]>Thu, 14 Dec 2006 12:25:27 +0000https://bugs.php.net/bug.php?id=39832