I am new to Axis2 and am trying to develop a web service using Axis 2 v1.1, Java 1.5 and the POJO approach. The service POJO that I developed uses the keyword "enum" for many different attribute "types". I am able to successfully generate WSDL from the POJO; however, when I try to create the client, via "wsdl2java" I receive the following errors:
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [snip] Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: error: Invalid QName value: Localname not a valid NCName in 'ax241:CLFService$CLFCommandType' [snip] I have tried several tricks to make the enum more visible to the service; however, in all cases I continue to receive the above error (only the name of the invalid NCName changes). My question is; does Axis2 v1.1 support the Java 1.5 "enum" keyword? If so, how do I make the WSDL generator recognize it? I have seen several posts in the mailing-list archives about Axis v1.3; however, none since Axis2 was released. Most of the Axis1 posts were requesting this feature. Has this been introduced? Also, if "enum" is not supported, do you recommend using the "type safe enum pattern" to solve this problem? I have also seen posts where people were having problems with that pattern as well. What is the recommended Axis2 "best practices" approach to solve this? Many thanks for the response.
