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 "Jesse Rosalia (JIRA)" <ji...@apache.org> on 2008/11/11 22:19:46 UTC
[jira] Created: (AXIS2-4128) Java2WSDL does not generate enum
fields
Java2WSDL does not generate enum fields
---------------------------------------
Key: AXIS2-4128
URL: https://issues.apache.org/jira/browse/AXIS2-4128
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Affects Versions: 1.4.1
Environment: Windows XP SP2, Java 1.6, Maven2 2.0.8, Maven2 Axis2 Java2WSDL plugin 1.4.1
Reporter: Jesse Rosalia
I have an interface that has a method that takes an enum value as a parameter:
public interface Interface {
public void Method(String param1,
String param2, EnumType param3,
String param4, Calendar param5, int param6);
}
EnumType is defined as:
public enum EnumType {
VALUE1,
VALUE2,
VALUE3,
VALUE4,
VALUE5
}
When I use Java2WSDL to generate a WSDL from this interface, it creates the complex type but does not add any values:
<xs:complexType name="EnumType">
<xs:complexContent>
<xs:extension base="xs:Enum">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
This happens when I execute the Java2WSDL step through the maven plugin as well as if I run the Java2WSDL command line class (org.apache.ws.java2wsdl.Java2WSDL).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-4128) Java2WSDL does not generate enum
fields
Posted by "Jesse Rosalia (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646669#action_12646669 ]
Jesse Rosalia commented on AXIS2-4128:
--------------------------------------
After some investigation, it appears that the problem is in DefaultSchemaGenerator.java (org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator), in the generateSchema(JClass javaType)... method, on line
652...heres the code from that area:
648: for (int i = 0; i < tempFields.length; i++) {
649: // create a element for the field only if it is public
650: // and there is no property with the same name
651: if (tempFields[i].isPublic()) {
652: if (tempFields[i].isStatic()){
653:// We do not need to expose static fields
654: continue;
655: }
tempFields[i].isStatic() is true for each of the enum fields. Is that normal/expected? I noticed that the modifiers of the field are 16409 (decimal, 4019h) which has a bit on that is not defined by java.lang.reflect.Modifier...is that something that can be checked to exclude enum values from this conditional?
> Java2WSDL does not generate enum fields
> ---------------------------------------
>
> Key: AXIS2-4128
> URL: https://issues.apache.org/jira/browse/AXIS2-4128
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1
> Environment: Windows XP SP2, Java 1.6, Maven2 2.0.8, Maven2 Axis2 Java2WSDL plugin 1.4.1
> Reporter: Jesse Rosalia
>
> I have an interface that has a method that takes an enum value as a parameter:
> public interface Interface {
> public void Method(String param1,
> String param2, EnumType param3,
> String param4, Calendar param5, int param6);
> }
> EnumType is defined as:
> public enum EnumType {
> VALUE1,
> VALUE2,
> VALUE3,
> VALUE4,
> VALUE5
> }
> When I use Java2WSDL to generate a WSDL from this interface, it creates the complex type but does not add any values:
> <xs:complexType name="EnumType">
> <xs:complexContent>
> <xs:extension base="xs:Enum">
> <xs:sequence/>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> This happens when I execute the Java2WSDL step through the maven plugin as well as if I run the Java2WSDL command line class (org.apache.ws.java2wsdl.Java2WSDL).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-4128) Java2WSDL does not generate enum
fields
Posted by "Jesse Rosalia (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646673#action_12646673 ]
Jesse Rosalia commented on AXIS2-4128:
--------------------------------------
Just modified my maven pom file to use version 1.3 and it appears to generate the wsdl correctly.
> Java2WSDL does not generate enum fields
> ---------------------------------------
>
> Key: AXIS2-4128
> URL: https://issues.apache.org/jira/browse/AXIS2-4128
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1
> Environment: Windows XP SP2, Java 1.6, Maven2 2.0.8, Maven2 Axis2 Java2WSDL plugin 1.4.1
> Reporter: Jesse Rosalia
>
> I have an interface that has a method that takes an enum value as a parameter:
> public interface Interface {
> public void Method(String param1,
> String param2, EnumType param3,
> String param4, Calendar param5, int param6);
> }
> EnumType is defined as:
> public enum EnumType {
> VALUE1,
> VALUE2,
> VALUE3,
> VALUE4,
> VALUE5
> }
> When I use Java2WSDL to generate a WSDL from this interface, it creates the complex type but does not add any values:
> <xs:complexType name="EnumType">
> <xs:complexContent>
> <xs:extension base="xs:Enum">
> <xs:sequence/>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> This happens when I execute the Java2WSDL step through the maven plugin as well as if I run the Java2WSDL command line class (org.apache.ws.java2wsdl.Java2WSDL).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Issue Comment Edited: (AXIS2-4128) Java2WSDL does not
generate enum fields
Posted by "Jesse Rosalia (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646669#action_12646669 ]
thejenix edited comment on AXIS2-4128 at 11/11/08 1:35 PM:
----------------------------------------------------------------
After some investigation, it appears that the problem is in DefaultSchemaGenerator.java (org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator), in the generateSchema(JClass javaType)... method, on line
652...heres the code from that area:
648: for (int i = 0; i < tempFields.length; i++) {
649: // create a element for the field only if it is public
650: // and there is no property with the same name
651: if (tempFields[i].isPublic()) {
652: if (tempFields[i].isStatic()){
653:// We do not need to expose static fields
654: continue;
655: }
tempFields[i].isStatic() is true for each of the enum fields. Is that normal/expected? I noticed that the modifiers of the field are 16409 (decimal, 4019h) which has a bit on that is not defined by java.lang.reflect.Modifier...is that something that can be checked to exclude enum values from this conditional?
----Edit----
I just checked and a normal public static field declared in EnumType has a modifier value of 9...a public static final field has a modifier value of 25 (19h)...that suggests there may be information in the modifiers to say a field is an enum value.
was (Author: thejenix):
After some investigation, it appears that the problem is in DefaultSchemaGenerator.java (org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator), in the generateSchema(JClass javaType)... method, on line
652...heres the code from that area:
648: for (int i = 0; i < tempFields.length; i++) {
649: // create a element for the field only if it is public
650: // and there is no property with the same name
651: if (tempFields[i].isPublic()) {
652: if (tempFields[i].isStatic()){
653:// We do not need to expose static fields
654: continue;
655: }
tempFields[i].isStatic() is true for each of the enum fields. Is that normal/expected? I noticed that the modifiers of the field are 16409 (decimal, 4019h) which has a bit on that is not defined by java.lang.reflect.Modifier...is that something that can be checked to exclude enum values from this conditional?
> Java2WSDL does not generate enum fields
> ---------------------------------------
>
> Key: AXIS2-4128
> URL: https://issues.apache.org/jira/browse/AXIS2-4128
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1
> Environment: Windows XP SP2, Java 1.6, Maven2 2.0.8, Maven2 Axis2 Java2WSDL plugin 1.4.1
> Reporter: Jesse Rosalia
>
> I have an interface that has a method that takes an enum value as a parameter:
> public interface Interface {
> public void Method(String param1,
> String param2, EnumType param3,
> String param4, Calendar param5, int param6);
> }
> EnumType is defined as:
> public enum EnumType {
> VALUE1,
> VALUE2,
> VALUE3,
> VALUE4,
> VALUE5
> }
> When I use Java2WSDL to generate a WSDL from this interface, it creates the complex type but does not add any values:
> <xs:complexType name="EnumType">
> <xs:complexContent>
> <xs:extension base="xs:Enum">
> <xs:sequence/>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> This happens when I execute the Java2WSDL step through the maven plugin as well as if I run the Java2WSDL command line class (org.apache.ws.java2wsdl.Java2WSDL).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Commented: (AXIS2-4128) Java2WSDL does not generate enum
fields
Posted by "Claude D Ballew Jr (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695512#action_12695512 ]
Claude D Ballew Jr commented on AXIS2-4128:
-------------------------------------------
I'm using the 1.4.1 version and this is still an issue, specifically I have a java 1.5 enum and the wsdl generated is
<xs:complexType name="Status">
−
<xs:complexContent>
−
<xs:extension base="xs:Enum">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
And the schema being used is
http://www.w3.org/2001/XMLSchema/Enum
that schema element does not exist...
> Java2WSDL does not generate enum fields
> ---------------------------------------
>
> Key: AXIS2-4128
> URL: https://issues.apache.org/jira/browse/AXIS2-4128
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: 1.4.1
> Environment: Windows XP SP2, Java 1.6, Maven2 2.0.8, Maven2 Axis2 Java2WSDL plugin 1.4.1
> Reporter: Jesse Rosalia
>
> I have an interface that has a method that takes an enum value as a parameter:
> public interface Interface {
> public void Method(String param1,
> String param2, EnumType param3,
> String param4, Calendar param5, int param6);
> }
> EnumType is defined as:
> public enum EnumType {
> VALUE1,
> VALUE2,
> VALUE3,
> VALUE4,
> VALUE5
> }
> When I use Java2WSDL to generate a WSDL from this interface, it creates the complex type but does not add any values:
> <xs:complexType name="EnumType">
> <xs:complexContent>
> <xs:extension base="xs:Enum">
> <xs:sequence/>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> This happens when I execute the Java2WSDL step through the maven plugin as well as if I run the Java2WSDL command line class (org.apache.ws.java2wsdl.Java2WSDL).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.