You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by jcaristi <jc...@whisolutions.com> on 2009/04/13 20:45:19 UTC

Invalid code generated on enumeration extension

I am getting invalid Java when I generate ADB binding code from my WSDL. 
Here is the offending code, which contains the invalid type "Int":

if (tempObjectAttribId!=null){
          object.setId((Int)tempObjectAttribId);
}

My WSDL defines an enumeration as follows:

	<simpleType name="ApplicationSearchElement">
		<restriction base="string">
			<length value="30" />
			<enumeration value="PositionId" />
			<enumeration value="QualifierId" />
			<enumeration value="RegionId" />
		</restriction>
	</simpleType>

I then use this enumeration in a complex type (the Java class which
represents this type has the error):

	<xsd:complexType name="ApplicationSearchCriterionType">
		<xsd:simpleContent>
			<xsd:extension base="tns:ApplicationSearchElement">
				<xsd:attribute name="Id" type="xsd:int" use="required" />
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>

I then use this type in another complex type:

	<xsd:complexType name="ApplicationSearchCriteriaType">
		<xsd:sequence>
			<xsd:element name="Criterion" minOccurs="1" maxOccurs="unbounded"
				type="tns:ApplicationSearchCriterionType" />
		</xsd:sequence>
	</xsd:complexType>

I then define an element within a sequence:

	<xsd:element name="SearchCriteria" type="tns:ApplicationSearchCriteriaType"
				minOccurs="0" maxOccurs="1" />
-- 
View this message in context: http://www.nabble.com/Invalid-code-generated-on-enumeration-extension-tp23026783p23026783.html
Sent from the Axis - User mailing list archive at Nabble.com.