axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BLIS Webmaster (Patrick Houbaux)" <>
Subject How to get Enumerations in WSDL?
Date Mon, 22 Mar 2004 13:07:17 GMT
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">
       		<element name="myClassType" nillable="true" type="xsd:anyType"/>

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

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 ...)? 


View raw message