[wsf-c-dev] [jira] Created: (WSFPHP-369) Deserialization of SOAP elements having minOccurs of zero
Carlos Perez (JIRA)
jira at wso2.org
Wed Jan 7 12:10:04 PST 2009
Deserialization of SOAP elements having minOccurs of zero
---------------------------------------------------------
Key: WSFPHP-369
URL: https://wso2.org/jira/browse/WSFPHP-369
Project: WSO2 WSF/PHP
Issue Type: Bug
Components: WSService
Affects Versions: 2.0.0
Environment: Linux ubuntu 2.6.24-22-generic #1 SMP Mon Nov 24 19:35:06 UTC 2008 x86_64 GNU/Linux
Reporter: Carlos Perez
Client errors are produced for SOAP responses that have the optional (minOccurs == 0) attribute defined in the WSDL. minOccurs="0" defines that the value may be nillable. I have WSDL that looks something like this and which is returned by a web service.
<xsd:complexType name="MySampleType">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="Foo" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="Bar" type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="Baz" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
If only "Bar" is provided, and "Foo" is not set (semantically null, not an empty string), you get an error message:
[Wed Jan 7 12:45:23 2009] [error] /wso2-wsf-php-src-2.0.0/scripts/dynamic_invocation/wsf_wsdl_deserialization.php(870) [WSF/PHP] minOccurs != 0 element Foo doesn't exist in the sequence.
[Wed Jan 7 12:45:23 2009] [error] /wso2-wsf-php-src-2.0.0/scripts/dynamic_invocation/wsf_wsdl_deserialization.php(872) [WSF/PHP] Bar is found in place of Foo
In file wso2-wsf-php-src-2.0.0/scripts/dynamic_invocation/wsf_wsdl_deserialization.php, there appears to be an error on line 869:
if($min_occurs == 0) {
ws_log_write(__FILE__, __LINE__, WSF_LOG_ERROR, "minOccurs != 0 element ". $param_name ." doesn't exist in the sequence.");
if($current_child->localName != NULL){
ws_log_write(__FILE__, __LINE__, WSF_LOG_ERROR, $current_child->localName. " is found in place of ". $param_name);
}
}
I think the test should be reversed: "min_occurs != 0".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the Wsf-c-dev
mailing list