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 Jose de Castro <jo...@gmail.com> on 2008/08/01 18:59:38 UTC

Integer wrapper

Hi,

I am using Axis2's WSDL2Java, and I'm having some issues in generating an
Integer wrapper.  My wsdl file has this:

<complexType name="EG01ThermostatHoldControlEvent">
        <complexContent>
          <extension base="dcens:EG01Event">
            <sequence>
              <element name="holdType" type="xsd:int" nillable="true"
minOccurs="0" maxOccurs="1" />
              <element name="holdSetpointNumber" type="xsd:int"
nillable="true" minOccurs="0" maxOccurs="1" />
              <element name="hoursRemaining" type="xsd:int" nillable="true"
minOccurs="0" maxOccurs="1" />
              <element name="daysRemaining" type="xsd:int" nillable="true"
minOccurs="0" maxOccurs="1" />
              <element name="day" type="xsd:int" nillable="true"
minOccurs="0" maxOccurs="1" />
              <element name="month" type="xsd:int" nillable="true"
minOccurs="0" maxOccurs="1" />
              <element name="temporaryHeatSetpoint" nillable="true"
type="xsd:int" minOccurs="0" maxOccurs="1" />
              <element name="temporaryCoolSetpoint" nillable="true"
type="xsd:int" minOccurs="0" maxOccurs="1" />
            </sequence>
          </extension>
        </complexContent>
      </complexType>

But the elements that get generated in Java end up as int primitive data
types instead of the Integer wrapper I intended to have.  Shouldn't the
nillable attribute make these elements as Integer wrappers when it is set to
"true"?

Jose