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 "Banck, Arent-Jan" <aj...@informatica.com> on 2004/07/20 15:34:47 UTC

string array helper type notation

I am trying to investigate problems I am having creating WSDL from
classes that have static helper type information. (Axis 1.2 CVS today)

I noticed that the elemField.setXmlType statement for string arrays in
classes generated by WSDL2Java does not have any information about the
array.
Is this correct? If not, what should the 'xmltype' be? If correct, how
does/should Axis extract the array information from this?

This seems to be the base of the problem I am looking into, array
information missing in some cases.

Thanks,
Arent-Jan


----------------------------------------
Snippit of User.wsdl
   <complexType name="User">
    <sequence>
     <element name="groupNames" nillable="true"
type="impl:ArrayOf_xsd_string"/>
    </sequence>
   </complexType>
----------------------------------------
Snippits of User.java generated with WSDL2Java:
.....
    /**
     * Gets the groupNames value for this User.
     * 
     * @return groupNames
     */
    public java.lang.String[] getGroupNames() {
        return groupNames;
    }


    /**
     * Sets the groupNames value for this User.
     * 
     * @param groupNames
     */
    public void setGroupNames(java.lang.String[] groupNames) {
        this.groupNames = groupNames;
    }
.....
    static {
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("groupNames");
        elemField.setXmlName(new javax.xml.namespace.QName("",
"groupNames"));
        elemField.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema",
"string"));
        typeDesc.addFieldDesc(elemField);