Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
None
-
None
Description
Setting the minOccurs for method parameters in the aegis mapping file does not apply to the wsdl so the wsdl shows method parameters like this for example (even with minOccurs set to 1):
<xsd:element name="findLocation">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="location" type="xsd:string"/>
<xsd:element minOccurs="0" name="findOptions" type="tns:FindOptions"/>
<xsd:element minOccurs="0" name="token" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
With minOccurs = 0, some toolkits would send the parameters like this if the findOptions parameter is null:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v20="http://arcwebservices.com/v2008">
<soapenv:Body>
<v20:findLocation>
<v20:location>Redlands</v20:location>
<v20:token>YXd4MmRlbW86MTE5NTE2jI3MzpGbGV4OjZjNmZlzQ21ZTljMTA4OTNVlY2NmOWF2Fl</v20:token>
</v20:findLocation>
</soapenv:Body>
</soapenv:Envelope>
Wich returns:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Current state not START_ELEMENT</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Not sure what the best way to fix it is but it seems like we either:
1- fix the code to apply the minOccurs from the aegis mapping files so clients don't send this kind of request
2- fix the code to be able to handle the minOccurs of 0 on the server side
Please let me know if yo need any more info.
Thanks