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]> 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]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Reply via email to