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 "Davanum Srinivas (JIRA)" <ji...@apache.org> on 2006/08/07 15:06:13 UTC
[jira] Created: (AXIS2-981) Support for Enumeration
Support for Enumeration
-----------------------
Key: AXIS2-981
URL: http://issues.apache.org/jira/browse/AXIS2-981
Project: Apache Axis 2.0 (Axis2)
Issue Type: Bug
Components: wsdl
Reporter: Davanum Srinivas
Attachments: PlaceType.java
WSDL:
https://svn.apache.org/repos/asf/webservices/axis/trunk/java/test/wsdl/terra/TerraService.WSDL
Schema Snippet:
<s:element name="CountPlacesInRect">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="upperleft" type="tns:LonLatPt" />
<s:element minOccurs="1" maxOccurs="1" name="lowerright" type="tns:LonLatPt" />
<s:element minOccurs="1" maxOccurs="1" name="ptype" type="tns:PlaceType" />
</s:sequence>
</s:complexType>
</s:element>
<s:simpleType name="PlaceType">
<s:restriction base="s:string">
<s:enumeration value="UnknownPlaceType" />
<s:enumeration value="AirRailStation" />
<s:enumeration value="BayGulf" />
<s:enumeration value="CapePeninsula" />
<s:enumeration value="CityTown" />
<s:enumeration value="HillMountain" />
<s:enumeration value="Island" />
<s:enumeration value="Lake" />
<s:enumeration value="OtherLandFeature" />
<s:enumeration value="OtherWaterFeature" />
<s:enumeration value="ParkBeach" />
<s:enumeration value="PointOfInterest" />
<s:enumeration value="River" />
</s:restriction>
</s:simpleType>
Problem: Axis2 generated code does not generate an ADBBean for PlaceType.java. It just creates methods using String since that is the restriction base. Axis1.X generates a bean for PlaceType.java and has the list of possible values as well (and allows only those to be get/set on the field). See enclosed java file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-981) Support for Enumeration
Posted by "Maryam Moazeni (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-981?page=comments#action_12428180 ]
Maryam Moazeni commented on AXIS2-981:
--------------------------------------
Hi,
I'll go with JDK 1.5 enums.
-Maryam
> Support for Enumeration
> -----------------------
>
> Key: AXIS2-981
> URL: http://issues.apache.org/jira/browse/AXIS2-981
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: wsdl
> Reporter: Davanum Srinivas
> Attachments: PlaceType.java
>
>
> WSDL:
> https://svn.apache.org/repos/asf/webservices/axis/trunk/java/test/wsdl/terra/TerraService.WSDL
> Schema Snippet:
> <s:element name="CountPlacesInRect">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="upperleft" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="lowerright" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="ptype" type="tns:PlaceType" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:simpleType name="PlaceType">
> <s:restriction base="s:string">
> <s:enumeration value="UnknownPlaceType" />
> <s:enumeration value="AirRailStation" />
> <s:enumeration value="BayGulf" />
> <s:enumeration value="CapePeninsula" />
> <s:enumeration value="CityTown" />
> <s:enumeration value="HillMountain" />
> <s:enumeration value="Island" />
> <s:enumeration value="Lake" />
> <s:enumeration value="OtherLandFeature" />
> <s:enumeration value="OtherWaterFeature" />
> <s:enumeration value="ParkBeach" />
> <s:enumeration value="PointOfInterest" />
> <s:enumeration value="River" />
> </s:restriction>
> </s:simpleType>
> Problem: Axis2 generated code does not generate an ADBBean for PlaceType.java. It just creates methods using String since that is the restriction base. Axis1.X generates a bean for PlaceType.java and has the list of possible values as well (and allows only those to be get/set on the field). See enclosed java file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-981) Support for Enumeration
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-981?page=comments#action_12428182 ]
Davanum Srinivas commented on AXIS2-981:
----------------------------------------
Hmm, no. Let's start with Axis 1.X style because Axis2 should be able to run in JDK1.4. we can then add a switch to generate 1.5 style enums.
thanks,
dims
> Support for Enumeration
> -----------------------
>
> Key: AXIS2-981
> URL: http://issues.apache.org/jira/browse/AXIS2-981
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: wsdl
> Reporter: Davanum Srinivas
> Attachments: PlaceType.java
>
>
> WSDL:
> https://svn.apache.org/repos/asf/webservices/axis/trunk/java/test/wsdl/terra/TerraService.WSDL
> Schema Snippet:
> <s:element name="CountPlacesInRect">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="upperleft" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="lowerright" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="ptype" type="tns:PlaceType" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:simpleType name="PlaceType">
> <s:restriction base="s:string">
> <s:enumeration value="UnknownPlaceType" />
> <s:enumeration value="AirRailStation" />
> <s:enumeration value="BayGulf" />
> <s:enumeration value="CapePeninsula" />
> <s:enumeration value="CityTown" />
> <s:enumeration value="HillMountain" />
> <s:enumeration value="Island" />
> <s:enumeration value="Lake" />
> <s:enumeration value="OtherLandFeature" />
> <s:enumeration value="OtherWaterFeature" />
> <s:enumeration value="ParkBeach" />
> <s:enumeration value="PointOfInterest" />
> <s:enumeration value="River" />
> </s:restriction>
> </s:simpleType>
> Problem: Axis2 generated code does not generate an ADBBean for PlaceType.java. It just creates methods using String since that is the restriction base. Axis1.X generates a bean for PlaceType.java and has the list of possible values as well (and allows only those to be get/set on the field). See enclosed java file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-981) Support for Enumeration
Posted by "Maryam Moazeni (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-981?page=comments#action_12428185 ]
Maryam Moazeni commented on AXIS2-981:
--------------------------------------
Sure :)
-Maryam
> Support for Enumeration
> -----------------------
>
> Key: AXIS2-981
> URL: http://issues.apache.org/jira/browse/AXIS2-981
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: wsdl
> Reporter: Davanum Srinivas
> Attachments: PlaceType.java
>
>
> WSDL:
> https://svn.apache.org/repos/asf/webservices/axis/trunk/java/test/wsdl/terra/TerraService.WSDL
> Schema Snippet:
> <s:element name="CountPlacesInRect">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="upperleft" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="lowerright" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="ptype" type="tns:PlaceType" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:simpleType name="PlaceType">
> <s:restriction base="s:string">
> <s:enumeration value="UnknownPlaceType" />
> <s:enumeration value="AirRailStation" />
> <s:enumeration value="BayGulf" />
> <s:enumeration value="CapePeninsula" />
> <s:enumeration value="CityTown" />
> <s:enumeration value="HillMountain" />
> <s:enumeration value="Island" />
> <s:enumeration value="Lake" />
> <s:enumeration value="OtherLandFeature" />
> <s:enumeration value="OtherWaterFeature" />
> <s:enumeration value="ParkBeach" />
> <s:enumeration value="PointOfInterest" />
> <s:enumeration value="River" />
> </s:restriction>
> </s:simpleType>
> Problem: Axis2 generated code does not generate an ADBBean for PlaceType.java. It just creates methods using String since that is the restriction base. Axis1.X generates a bean for PlaceType.java and has the list of possible values as well (and allows only those to be get/set on the field). See enclosed java file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-981) Support for Enumeration
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-981?page=all ]
Davanum Srinivas resolved AXIS2-981.
------------------------------------
Resolution: Fixed
Checked in a fix in r432572. Codegen works, need to do thorough testing for runtime behavior.
-- dims
> Support for Enumeration
> -----------------------
>
> Key: AXIS2-981
> URL: http://issues.apache.org/jira/browse/AXIS2-981
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: wsdl
> Reporter: Davanum Srinivas
> Priority: Blocker
> Attachments: PlaceType.java
>
>
> WSDL:
> https://svn.apache.org/repos/asf/webservices/axis/trunk/java/test/wsdl/terra/TerraService.WSDL
> Schema Snippet:
> <s:element name="CountPlacesInRect">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="upperleft" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="lowerright" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="ptype" type="tns:PlaceType" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:simpleType name="PlaceType">
> <s:restriction base="s:string">
> <s:enumeration value="UnknownPlaceType" />
> <s:enumeration value="AirRailStation" />
> <s:enumeration value="BayGulf" />
> <s:enumeration value="CapePeninsula" />
> <s:enumeration value="CityTown" />
> <s:enumeration value="HillMountain" />
> <s:enumeration value="Island" />
> <s:enumeration value="Lake" />
> <s:enumeration value="OtherLandFeature" />
> <s:enumeration value="OtherWaterFeature" />
> <s:enumeration value="ParkBeach" />
> <s:enumeration value="PointOfInterest" />
> <s:enumeration value="River" />
> </s:restriction>
> </s:simpleType>
> Problem: Axis2 generated code does not generate an ADBBean for PlaceType.java. It just creates methods using String since that is the restriction base. Axis1.X generates a bean for PlaceType.java and has the list of possible values as well (and allows only those to be get/set on the field). See enclosed java file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-981) Support for Enumeration
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-981?page=all ]
Davanum Srinivas updated AXIS2-981:
-----------------------------------
Priority: Blocker (was: Major)
> Support for Enumeration
> -----------------------
>
> Key: AXIS2-981
> URL: http://issues.apache.org/jira/browse/AXIS2-981
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: wsdl
> Reporter: Davanum Srinivas
> Priority: Blocker
> Attachments: PlaceType.java
>
>
> WSDL:
> https://svn.apache.org/repos/asf/webservices/axis/trunk/java/test/wsdl/terra/TerraService.WSDL
> Schema Snippet:
> <s:element name="CountPlacesInRect">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="upperleft" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="lowerright" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="ptype" type="tns:PlaceType" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:simpleType name="PlaceType">
> <s:restriction base="s:string">
> <s:enumeration value="UnknownPlaceType" />
> <s:enumeration value="AirRailStation" />
> <s:enumeration value="BayGulf" />
> <s:enumeration value="CapePeninsula" />
> <s:enumeration value="CityTown" />
> <s:enumeration value="HillMountain" />
> <s:enumeration value="Island" />
> <s:enumeration value="Lake" />
> <s:enumeration value="OtherLandFeature" />
> <s:enumeration value="OtherWaterFeature" />
> <s:enumeration value="ParkBeach" />
> <s:enumeration value="PointOfInterest" />
> <s:enumeration value="River" />
> </s:restriction>
> </s:simpleType>
> Problem: Axis2 generated code does not generate an ADBBean for PlaceType.java. It just creates methods using String since that is the restriction base. Axis1.X generates a bean for PlaceType.java and has the list of possible values as well (and allows only those to be get/set on the field). See enclosed java file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-981) Support for Enumeration
Posted by "Maryam Moazeni (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-981?page=comments#action_12427692 ]
Maryam Moazeni commented on AXIS2-981:
--------------------------------------
Hi,
It seems that Axis2 is aimed to write only elements and complex types. Is this going to be changed?
Thanks,
Maryam
> Support for Enumeration
> -----------------------
>
> Key: AXIS2-981
> URL: http://issues.apache.org/jira/browse/AXIS2-981
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: wsdl
> Reporter: Davanum Srinivas
> Attachments: PlaceType.java
>
>
> WSDL:
> https://svn.apache.org/repos/asf/webservices/axis/trunk/java/test/wsdl/terra/TerraService.WSDL
> Schema Snippet:
> <s:element name="CountPlacesInRect">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="upperleft" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="lowerright" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="ptype" type="tns:PlaceType" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:simpleType name="PlaceType">
> <s:restriction base="s:string">
> <s:enumeration value="UnknownPlaceType" />
> <s:enumeration value="AirRailStation" />
> <s:enumeration value="BayGulf" />
> <s:enumeration value="CapePeninsula" />
> <s:enumeration value="CityTown" />
> <s:enumeration value="HillMountain" />
> <s:enumeration value="Island" />
> <s:enumeration value="Lake" />
> <s:enumeration value="OtherLandFeature" />
> <s:enumeration value="OtherWaterFeature" />
> <s:enumeration value="ParkBeach" />
> <s:enumeration value="PointOfInterest" />
> <s:enumeration value="River" />
> </s:restriction>
> </s:simpleType>
> Problem: Axis2 generated code does not generate an ADBBean for PlaceType.java. It just creates methods using String since that is the restriction base. Axis1.X generates a bean for PlaceType.java and has the list of possible values as well (and allows only those to be get/set on the field). See enclosed java file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-981) Support for Enumeration
Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-981?page=comments#action_12427706 ]
Davanum Srinivas commented on AXIS2-981:
----------------------------------------
Maryam,
>From prev experience, people look for either JDK1.5 style enum's or an enum class similar to Axis 1.X. For example, here's the artifact generated by JAXB 2.0
package com.terraservice_usa;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import com.terraservice_usa.PlaceType;
/**
* <p>Java class for PlaceType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="PlaceType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="UnknownPlaceType"/>
* <enumeration value="AirRailStation"/>
* <enumeration value="BayGulf"/>
* <enumeration value="CapePeninsula"/>
* <enumeration value="CityTown"/>
* <enumeration value="HillMountain"/>
* <enumeration value="Island"/>
* <enumeration value="Lake"/>
* <enumeration value="OtherLandFeature"/>
* <enumeration value="OtherWaterFeature"/>
* <enumeration value="ParkBeach"/>
* <enumeration value="PointOfInterest"/>
* <enumeration value="River"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlEnum
public enum PlaceType {
@XmlEnumValue("AirRailStation")
AIR_RAIL_STATION("AirRailStation"),
@XmlEnumValue("BayGulf")
BAY_GULF("BayGulf"),
@XmlEnumValue("CapePeninsula")
CAPE_PENINSULA("CapePeninsula"),
@XmlEnumValue("CityTown")
CITY_TOWN("CityTown"),
@XmlEnumValue("HillMountain")
HILL_MOUNTAIN("HillMountain"),
@XmlEnumValue("Island")
ISLAND("Island"),
@XmlEnumValue("Lake")
LAKE("Lake"),
@XmlEnumValue("OtherLandFeature")
OTHER_LAND_FEATURE("OtherLandFeature"),
@XmlEnumValue("OtherWaterFeature")
OTHER_WATER_FEATURE("OtherWaterFeature"),
@XmlEnumValue("ParkBeach")
PARK_BEACH("ParkBeach"),
@XmlEnumValue("PointOfInterest")
POINT_OF_INTEREST("PointOfInterest"),
@XmlEnumValue("River")
RIVER("River"),
@XmlEnumValue("UnknownPlaceType")
UNKNOWN_PLACE_TYPE("UnknownPlaceType");
private final String value;
PlaceType(String v) {
value = v;
}
public String value() {
return value;
}
public static PlaceType fromValue(String v) {
for (PlaceType c: PlaceType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v.toString());
}
}
> Support for Enumeration
> -----------------------
>
> Key: AXIS2-981
> URL: http://issues.apache.org/jira/browse/AXIS2-981
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: wsdl
> Reporter: Davanum Srinivas
> Attachments: PlaceType.java
>
>
> WSDL:
> https://svn.apache.org/repos/asf/webservices/axis/trunk/java/test/wsdl/terra/TerraService.WSDL
> Schema Snippet:
> <s:element name="CountPlacesInRect">
> <s:complexType>
> <s:sequence>
> <s:element minOccurs="1" maxOccurs="1" name="upperleft" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="lowerright" type="tns:LonLatPt" />
> <s:element minOccurs="1" maxOccurs="1" name="ptype" type="tns:PlaceType" />
> </s:sequence>
> </s:complexType>
> </s:element>
> <s:simpleType name="PlaceType">
> <s:restriction base="s:string">
> <s:enumeration value="UnknownPlaceType" />
> <s:enumeration value="AirRailStation" />
> <s:enumeration value="BayGulf" />
> <s:enumeration value="CapePeninsula" />
> <s:enumeration value="CityTown" />
> <s:enumeration value="HillMountain" />
> <s:enumeration value="Island" />
> <s:enumeration value="Lake" />
> <s:enumeration value="OtherLandFeature" />
> <s:enumeration value="OtherWaterFeature" />
> <s:enumeration value="ParkBeach" />
> <s:enumeration value="PointOfInterest" />
> <s:enumeration value="River" />
> </s:restriction>
> </s:simpleType>
> Problem: Axis2 generated code does not generate an ADBBean for PlaceType.java. It just creates methods using String since that is the restriction base. Axis1.X generates a bean for PlaceType.java and has the list of possible values as well (and allows only those to be get/set on the field). See enclosed java file.
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org