Dear all,

I have the following design for my object datatype model I want to expose from my web service:

====
public class MyClass {
        MyClassTypeEnum myClassType;

        public MyClassTypeEnum  getMyClassType(){
                return myClassType;
        }

        public void setMyClassType(MyClassTypeEnum type_){
                this.myClassType = type_;
        }
}

====

public class MyClassTypeEnum {
        
        private String typeName;

private MyClassTypeEnum () {
}
private MyClassTypeEnum (String typeName_){
this.typeName = typeName_;
}
public static final MyClassTypeEnum TESTENUM = new MyClassTypeEnum("TESTENUM");
public static final MyClassTypeEnum TESTENUM2 = new MyClassTypeEnum("TESTENUM2");
}


=====

How can I get java2wsdl to generate an XML enumeration for my typesafe enumeration (MyClassTypeEnum) in the generated WSDL?

For now, I don't get anything for MyClassTypeEnum and for MyClass I get the following:

<complexType name="MyClass">
     <sequence>
                <element name="myClassType" nillable="true" type="xsd:anyType"/>
     </sequence>
</complexContent>

I would like the "xsd:anyType" to be replaced with a nice XSD enumeration corresponding to MyClassTypeEnum.

Is it possible at all?
Any idea out there? if yes how should I do to get it right (design modification, flag passed to java2wsdl, etc ...)?


Thanks.
Regards,
Patrick.





Reply via email to