On 8/30/07, Leon Hwang <[EMAIL PROTECTED]> wrote: > > Wow... > > Thank you, Keith. > > Then, I guess, returning enum type won't do any good. (like I can...) > > What does people do? > Is there any alternative? > Only way I can think of is to return a primitive type or String > representation of the enum value, > then communicate with developers wring client, "You have to use this EXACT > string". > > Keith, do you happen to know when the enum feature will be supported by > Axis2?
It is on the table for next Axis2 release version. Best, Sanka Thank you, again. > > - Leon > > keith chapman wrote: > > Axis2 is JDK 1.4 compatible. Hence it does not use JDK 1.5 features. > > This is the reason you see code like the following. > > > > Gender g = new Gender(); > > g.getFEMALE(); > > > > Thanks, > > Keith. > > > > On 8/30/07, *Leon Hwang* <[EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > Hello there, > > > > I created a simple function that returns an object type of enum. > > It is very simple function: > > > > public static Gender getGender() { > > return Gender.MALE; > > } > > > > but when I opened the page from a browser > > http://localhost:8080/OpenApi/services/TestApi10/getGender > > > > it generates an error like > > <soapenv:Reason> > > <soapenv:Text xml:lang="en-US"> > > java.lang.RuntimeException: org.apache.axis2.AxisFault: > > Mapping qname not fond for the package: org.apache.catalina.loader > > </soapenv:Text> > > </soapenv:Reason> > > > > If I return any other objects, it works fine. > > Am I not supposed to Enum type? > > I think this is an error in Axis2. > > By the way, I would not like to use Type-safe enum. > > It has its own problem. > > > > I have attached a source code and services.xml (TestApi.xml ) and > > wsdl (TestApi10.xml - created by Axis2 on the fly). > > > > > > By the way, if I create a client using WSDL2Java > > wsdl2java.bat -or -g -Eofv -uw -u -uri > > http://localhost:8080/OpenApi/services/UserApi10?wsdl > > > > I get a warning like this: > > [WARN] Type {http://www.w3.org/2001/XMLSchema}Enum missing! > > > > How do I get rid of this? > > > > Also WSDL2Java doesn't create a enum type for Gender. Rather it is a > > regular class. > > Which I have to use it like > > > > Gender g = new Gender(); > > g.getFEMALE(); > > > > This didn't make a sense to me. > > > > > > As a comparison, .NET create an enum type correctly. > > In WSDL that .NET create, it is a just simpleType with restrictions. > > I don't know if that caused the problem or not. > > > > I would appreciate if you could give any help on this. > > > > Thank you, > > > > - Leon > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: [EMAIL PROTECTED] > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > -- > > Keith Chapman > > WSO2 Inc. > > Oxygen for Web Services Developers. > > http://wso2.org/ > > -- > Leon Hwang > Senior Tech Lead > MyStrands Inc. > > work: 1.541.753.4426 > mobile: 1.541.740.7511 > fax: 1.541.754.6416 > email: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Sanka Samaranayake WSO2 Inc. http://www.bloglines.com/blog/sanka http://www.wso2.org/
