You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Robin Taylor (JIRA)" <ax...@ws.apache.org> on 2005/07/27 16:58:20 UTC

[jira] Commented: (AXIS-2144) WSDL maxOccurs not resulting in an array in Java code.

    [ http://issues.apache.org/jira/browse/AXIS-2144?page=comments#action_12316920 ] 

Robin Taylor commented on AXIS-2144:
------------------------------------

Once again I should have done more digging before reporting a problem. It seems that Axis does not yet support maxOccurs on an <xsd:sequence> element. The same seems to apply to minOccurs in that the generated Java code relating to serializing objects does not set minOccurs=true if the minOccurs attribute is on a sequence element. This is a significant hurdle for me as the IMS specification for RLI has numerous min/maxOccurs attributes on sequence elements.

Please feel free to close this "bug". Apologies for any time wasted. 

> WSDL maxOccurs not resulting in an array in Java code.
> ------------------------------------------------------
>
>          Key: AXIS-2144
>          URL: http://issues.apache.org/jira/browse/AXIS-2144
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1
>  Environment: Windows XP, Java 1.5, Axis 1.2.1
>     Reporter: Robin Taylor

>
> The following WSDL/XML code is taken from the IMS RLI specification (http://www.imsglobal.org/services/rli/rlicommon/imsRLICommonSchema_v1p0.xsd)
> I would have expected the resulting Java class to define an array variable for element LangString but it doesn't.  Apologies if I this is just a misunderstanding on my part.  
> <xsd:complexType name="SeqLangStringDType">
>   <xsd:sequence maxOccurs="unbounded">
>      <xsd:element ref="LangString" /> 
>   </xsd:sequence>
> </xsd:complexType>
> The created Java code is ...
> /**
>  * SeqLangStringDType.java
>  *
>  * This file was auto-generated from WSDL
>  * by the Apache Axis 1.2 May 03, 2005 (02:20:24 EDT) WSDL2Java emitter.
>  */
> package org.imsglobal.www.services.rli.rlicommon.imsRLICommonSchema_v1p0;
> public class SeqLangStringDType  implements java.io.Serializable {
>     private org.imsglobal.www.services.rli.rlicommon.imsRLICommonSchema_v1p0.LangStringDType langString;
>     public SeqLangStringDType() {
>     }
>     public SeqLangStringDType(
>            org.imsglobal.www.services.rli.rlicommon.imsRLICommonSchema_v1p0.LangStringDType langString) {
>            this.langString = langString;
>     }
>     /**
>      * Gets the langString value for this SeqLangStringDType.
>      * 
>      * @return langString
>      */
>     public org.imsglobal.www.services.rli.rlicommon.imsRLICommonSchema_v1p0.LangStringDType getLangString() {
>         return langString;
>     }
>     /**
>      * Sets the langString value for this SeqLangStringDType.
>      * 
>      * @param langString
>      */
>     public void setLangString(org.imsglobal.www.services.rli.rlicommon.imsRLICommonSchema_v1p0.LangStringDType langString) {
>         this.langString = langString;
>     }
>     private java.lang.Object __equalsCalc = null;
>     public synchronized boolean equals(java.lang.Object obj) {
>         if (!(obj instanceof SeqLangStringDType)) return false;
>         SeqLangStringDType other = (SeqLangStringDType) obj;
>         if (obj == null) return false;
>         if (this == obj) return true;
>         if (__equalsCalc != null) {
>             return (__equalsCalc == obj);
>         }
>         __equalsCalc = obj;
>         boolean _equals;
>         _equals = true && 
>             ((this.langString==null && other.getLangString()==null) || 
>              (this.langString!=null &&
>               this.langString.equals(other.getLangString())));
>         __equalsCalc = null;
>         return _equals;
>     }
>     private boolean __hashCodeCalc = false;
>     public synchronized int hashCode() {
>         if (__hashCodeCalc) {
>             return 0;
>         }
>         __hashCodeCalc = true;
>         int _hashCode = 1;
>         if (getLangString() != null) {
>             _hashCode += getLangString().hashCode();
>         }
>         __hashCodeCalc = false;
>         return _hashCode;
>     }
>     // Type metadata
>     private static org.apache.axis.description.TypeDesc typeDesc =
>         new org.apache.axis.description.TypeDesc(SeqLangStringDType.class, true);
>     static {
>         typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.imsglobal.org/services/rli/rlicommon/imsRLICommonSchema_v1p0", "SeqLangStringDType"));
>         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
>         elemField.setFieldName("langString");
>         elemField.setXmlName(new javax.xml.namespace.QName("http://www.imsglobal.org/services/rli/rlicommon/imsRLICommonSchema_v1p0", "LangString"));
>         elemField.setXmlType(new javax.xml.namespace.QName("http://www.imsglobal.org/services/rli/rlicommon/imsRLICommonSchema_v1p0", "LangString"));
>         elemField.setNillable(false);
>         typeDesc.addFieldDesc(elemField);
>     }
>     /**
>      * Return type metadata object
>      */
>     public static org.apache.axis.description.TypeDesc getTypeDesc() {
>         return typeDesc;
>     }
>     /**
>      * Get Custom Serializer
>      */
>     public static org.apache.axis.encoding.Serializer getSerializer(
>            java.lang.String mechType, 
>            java.lang.Class _javaType,  
>            javax.xml.namespace.QName _xmlType) {
>         return 
>           new  org.apache.axis.encoding.ser.BeanSerializer(
>             _javaType, _xmlType, typeDesc);
>     }
>     /**
>      * Get Custom Deserializer
>      */
>     public static org.apache.axis.encoding.Deserializer getDeserializer(
>            java.lang.String mechType, 
>            java.lang.Class _javaType,  
>            javax.xml.namespace.QName _xmlType) {
>         return 
>           new  org.apache.axis.encoding.ser.BeanDeserializer(
>             _javaType, _xmlType, typeDesc);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira