[wsf-c-dev] [jira] Created: (WSFPHP-306) Response doesn't validate in WSDL mode when returning an empty array

Thomas Kelder (JIRA) jira at wso2.org
Fri Jul 25 02:09:52 PDT 2008


Response doesn't validate in WSDL mode when returning an empty array
--------------------------------------------------------------------

                 Key: WSFPHP-306
                 URL: https://wso2.org/jira/browse/WSFPHP-306
             Project: WSO2 WSF/PHP
          Issue Type: Bug
          Components: WSDL Generation , WSDL Mode
            Reporter: Thomas Kelder


see: http://wso2.org/forum/thread/3884
I'm setting up a webservice using the WSO2 WSF/php module. The service uses automatic WSDL generation from php code. One of the operations returns an array of objects, which normally works fine. However, when I return an empty array, my client in Java (using Axis2 with ADB) fails with the following error:

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement getRecentChangesResponse

When I look at the xml response using soapUI, this seems ok:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <ns1:getRecentChangesResponse xmlns:ns1="http://www.wso2.org/php/xsd"/>
   </soapenv:Body>
</soapenv:Envelope>

However, it doesn't validate against the definition in the wsdl:

<xsd:element name="getRecentChangesResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="pathways" maxOccurs="unbounded" type="ns1:WSPathwayInfo"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

This could be resolved by adding 'minOccurs="0"' to the xsd:sequence tag (this fixed both the xml validation and the ADB client)

-- 
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