axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Axel Bock" <>
Subject [Axis1.4] MinOccurs is ignored with string types?
Date Tue, 24 Oct 2006 14:25:02 GMT
Hi all,

I have a WSDL file with a schema definition like this:

 <xs:complexType name="Professional">
   <xs:element name="name" type="Name" />
   <xs:element name="contact" type="ContactData" minOccurs="0" />
   <xs:element name="qualification" type="Qualification" />
   <xs:element name="additionalQualification" type="Qualification"
minOccurs="0" />
   <xs:element name="organizationName" type="xs:string" minOccurs="0" />

Now when I generate Axis stubs with this definition I will get the following
code in

        typeDesc.setXmlType(new javax.xml.namespace.QName("", "Professional"));
        org.apache.axis.description.ElementDesc elemField = new
        elemField.setXmlName(new javax.xml.namespace.QName("", "organizationName"));
        elemField.setXmlType(new javax.xml.namespace.QName("", "string"));
        elemField = new org.apache.axis.description.ElementDesc();
        // ...

As you can see the MinOccurs command is completely ignored on the
organization element. On the other optional complex types this is not a
problem, though. I adjusted the MinOccurs to 5 and the MaxOccurs to 7, and
even then no (min/max)Occurs property setting was present in the generated

So now I think that maybe Axis has a problem with simple types like String
when it comes to generate code with occurrency information. Can anyone
confirm this, maybe? Or tell me what I'm doing wrong? Or - best of all :-) -
give me a workaround?

Greetings & thanks in advance,

View raw message