CLOSED: WSDL: MinOccurs not supported in this context

0
I am providing feedback on a webservice that is under development. My first feedback has been that Mendix does not support xsd:all. When replacing xsd:all with xsd:sequence I get something like the following wsdl: <xsd:complexType name="control_area"> <xsd:sequence> <xsd:element name="source" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="source_send_date" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/> <xsd:element name="api_key" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="message_id" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="correlation_id" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="request"> <xsd:sequence> <xsd:element name="product" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="request_operation" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="card_type" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="card_state" type="xsd:string" minOccurs="1" maxOccurs="1"/> When trying to import this WSDL I get the following error: Error message: Het attribuut minOccurs wordt niet ondersteund in deze context. -------------------------------- System.Xml.Schema.XmlSchemaException: Het attribuut minOccurs wordt niet ondersteund in deze context. at System.Xml.Schema.XmlSchema.Read(XmlReader reader, ValidationEventHandler validationEventHandler) at System.Xml.Schema.XmlSchema.Read(TextReader reader, ValidationEventHandler validationEventHandler) at Mendix.Modeler.XmlSchemas.SchemaImporter.ImportSchemata(IEnumerable`1 schemaContentss) in c:\cygwin\home\autobuild\build\Mendix-2.5\modeler\Modeler\XmlSchemas\SchemaImporter.cs:line 59 at Mendix.Modeler.WebServices.WsdlInfo.BuildContents(String url, List`1 messages) in c:\cygwin\home\autobuild\build\Mendix-2.5\modeler\Modeler\WebServices\Call\WsdlInfo.cs:line 147 at Mendix.Modeler.WebServices.WsdlInfo.FromUrl(String url, List`1 messages) in c:\cygwin\home\autobuild\build\Mendix-2.5\modeler\Modeler\WebServices\Call\WsdlInfo.cs:line 51 What can cause this error? UPDATE: Issue was not in part that I provided but in the following: <xsd:complexType name="ArrayOfError"> <xsd:complexContent> <xsd:restriction base="soapenc:Array"> <xsd:attribute ref="soapenc:arrayType" minOccurs="" wsdl:arrayType="tns:Error[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> Removing the minOccurs here fixes the issue. Does that make sense?
asked
1 answers
-2

Mendix does not always support MinOccurs=1, MaxOccurs=1. You can replace the MinOccurs=1 with MinOccurs=0. You have to force the existence of that element yourself.

answered