[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    Enum in WSDL gone
From:       "Glen Verran" <glen.verran () traderoot ! com>
Date:       2008-04-29 9:56:07
Message-ID: 5A3418AC7876DC4B9FEEC69799C39B1F01AF02 () servo ! Traderoot ! local
[Download RAW message or body]

Hi folks,
 
I am using a nightly build dated the 25th of April 2008.  
 
I created a POJO with one method and with one parameter.  The parameter
is a class with a couple of variables in it of which one of the
variables is of the type DataEncodingType which is a class as specified
below.
 
When Axis2 generates the WSDL the complexType is generated as below:
 
<xs:complexType name="DataEncodingType">
  <xs:complexContent>
    <xs:extension base="xs:Enum">
      <xs:sequence/>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>
 
With no mention of the enum values.  This used to work in a previous
nightly build about 2 weeks ago, but when I used the 25th April nightly
build, the enum is gone.
 
 
package axis2.testproject.jaxb;
 
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
 
@XmlType(name = "DataEncodingType")
@XmlEnum
public enum DataEncodingType {
 
    RAW("RAW"),
    HEX("HEX"),
    @XmlEnumValue("BASE64")
    BASE_64("BASE64");
    private final String value;
 
    DataEncodingType(String v) {
        value = v;
    }
 
    public String value() {
        return value;
    }
 
    public static DataEncodingType fromValue(String v) {
        for (DataEncodingType c: DataEncodingType.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }
 
}


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>Hi 
folks,</FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>I am using a nightly 
build dated the 25th of April 2008.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>I created a POJO 
with one method and with one parameter.&nbsp; The parameter is a class with a 
couple of variables in it of which one of the variables is of the type 
DataEncodingType&nbsp;which is a class as specified below.</FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>When Axis2 generates 
the WSDL the complexType is generated as below:</FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>&lt;xs:complexType 
name="DataEncodingType"&gt;<BR>&nbsp; 
&lt;xs:complexContent&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;xs:extension 
base="xs:Enum"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;xs:sequence/&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/xs:extension&gt;<BR>&nbsp; 
&lt;/xs:complexContent&gt;<BR>&lt;/xs:complexType&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>With no mention of 
the enum values.&nbsp; This used to work in a previous nightly build about 2 
weeks ago, but when I used the 25th April nightly build, the enum is 
gone.</FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>package 
axis2.testproject.jaxb;</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>import 
javax.xml.bind.annotation.XmlEnum;<BR>import 
javax.xml.bind.annotation.XmlEnumValue;<BR>import 
javax.xml.bind.annotation.XmlType;</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>@XmlType(name = 
"DataEncodingType")<BR>@XmlEnum<BR>public enum DataEncodingType 
{</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
RAW("RAW"),<BR>&nbsp;&nbsp;&nbsp; HEX("HEX"),<BR>&nbsp;&nbsp;&nbsp; 
@XmlEnumValue("BASE64")<BR>&nbsp;&nbsp;&nbsp; 
BASE_64("BASE64");<BR>&nbsp;&nbsp;&nbsp; private final String 
value;</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
DataEncodingType(String v) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value 
= v;<BR>&nbsp;&nbsp;&nbsp; }</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
public String value() {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
value;<BR>&nbsp;&nbsp;&nbsp; }</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
public static DataEncodingType fromValue(String v) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (DataEncodingType c: 
DataEncodingType.values()) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
(c.value.equals(v)) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return c;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw new 
IllegalArgumentException(v);<BR>&nbsp;&nbsp;&nbsp; }</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial 
size=2>}<BR></FONT></SPAN></DIV></BODY></HTML>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic