Hi all,
I have a WSDL file with a schema definition like this:
<xs:complexType name="Professional">
<xs:sequence>
<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" />
</xs:sequence>
</xs:complexType>
Now when I generate Axis stubs with this definition I will get the following code in Professional.java:
typeDesc.setXmlType(new javax.xml.namespace.QName("http://bpm.icw.com/regservices/v1-0-0/domain
", "Professional"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName ("organizationName");
elemField.setXmlName(new javax.xml.namespace.QName("http://bpm.icw.com/regservices/v1-0-0/domain ", "organizationName"));
elemField.setXmlType(new javax.xml.namespace.QName(" http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName ("organizationName");
elemField.setXmlName(new javax.xml.namespace.QName("http://bpm.icw.com/regservices/v1-0-0/domain ", "organizationName"));
elemField.setXmlType(new javax.xml.namespace.QName(" http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
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 code.
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,
Axel.
