[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> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>I am using a nightly
build dated the 25th of April 2008. </FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial
size=2></FONT></SPAN> </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> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2><xs:complexType
name="DataEncodingType"><BR>
<xs:complexContent><BR> <xs:extension
base="xs:Enum"><BR>
<xs:sequence/><BR> </xs:extension><BR>
</xs:complexContent><BR></xs:complexType></FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>package
axis2.testproject.jaxb;</FONT></SPAN></DIV>
<DIV> </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> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>@XmlType(name =
"DataEncodingType")<BR>@XmlEnum<BR>public enum DataEncodingType
{</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>
RAW("RAW"),<BR> HEX("HEX"),<BR>
@XmlEnumValue("BASE64")<BR>
BASE_64("BASE64");<BR> private final String
value;</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>
DataEncodingType(String v) {<BR> value
= v;<BR> }</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>
public String value() {<BR> return
value;<BR> }</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=862521107-29042008><FONT face=Arial size=2>
public static DataEncodingType fromValue(String v)
{<BR> for (DataEncodingType c:
DataEncodingType.values())
{<BR> if
(c.value.equals(v))
{<BR>
return c;<BR>
}<BR>
}<BR> throw new
IllegalArgumentException(v);<BR> }</FONT></SPAN></DIV>
<DIV> </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