You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
I have a simple wrapper class that contains a field named "items" which is a Collection of simple types. Using the @xmllist annotation I get a nice space-delimited String of values. Placing @XmlValue annotation on that field allows the class to be referenced from another class as an @XmlAttribute.
@XmlType
@XmlRootElement
public class ListOnly {
@XmlList
@XmlValue
List<String> items = new ArrayList<String>();
}
Notice I also place the @XmlRootElement on the class so I may use it as a return type from a JAX-RS Resource:
Notice the method name includes illegal characters [].
I don't think I was expecting String[] to be the return type anyway. It seems the return type should simply be String since the formatted XmlList results in a single String. Changing the return type would also bypass the naming problem if that is appropriate.
The work-around is to remove the @XmlValue annotation which disallows the class' use as an XmlAttribute.
Environment
maven wadl-client-plugin 1.1.2.1
Mac OSX Mountain Lion
Affected Versions
[1.1.2]
The text was updated successfully, but these errors were encountered:
I have a simple wrapper class that contains a field named "items" which is a Collection of simple types. Using the @xmllist annotation I get a nice space-delimited String of values. Placing @XmlValue annotation on that field allows the class to be referenced from another class as an @XmlAttribute.
Notice I also place the @XmlRootElement on the class so I may use it as a return type from a JAX-RS Resource:
Running wadl-client-plugin I receive a compile error since the resulting method name is also the return type of String[].
Notice the method name includes illegal characters [].
I don't think I was expecting String[] to be the return type anyway. It seems the return type should simply be String since the formatted XmlList results in a single String. Changing the return type would also bypass the naming problem if that is appropriate.
The work-around is to remove the @XmlValue annotation which disallows the class' use as an XmlAttribute.
Environment
maven wadl-client-plugin 1.1.2.1
Mac OSX Mountain Lion
Affected Versions
[1.1.2]
The text was updated successfully, but these errors were encountered: