Hi Sergey,
Thanks for your help.
Introduce a simple public BaseballCardCollection bean isn't a relly option
for me. I tried with a collectionWrapperMap property, but I got some
problems. First of all, must I use the interface or the implemation name in
<key><value>...</value></key>?
when I try:
<bean id="jaxbProvider"
class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
<property name="collectionWrapperMap">
<map>
<entry>
<key><value>mypackage.MyInterface</value></key>
<value>MyObjects</value>
</entry>
</map>
</property>
</bean>
I get:
"Unexpected EOF; was expecting a close tag for element <MyObjects>"
and when I try:
<bean id="jaxbProvider"
class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
<property name="collectionWrapperMap">
<map>
<entry>
<key><value>mypackage.MyImplementation</value></key>
<value>MyObjects</value>
</entry>
</map>
</property>
</bean>
I get:
"WARNING: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts
of Il
legalAnnotationExceptions
mypackage.MyInterface is an interface, and JAXB can't handle inter
faces.
this problem is related to the following location:
at mypackage.MyInterface
demo.jaxrs.server.CustomerInterface does not have a no-arg default
constructor.
this problem is related to the following location:
at mypackage.MyInterface
"
Last remark: I'm getting the fixed version from
https://repository.apache.org/content/groups/snapshots-group
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>2.2.10-SNAPSHOT</version>
</dependency>
Is that right?
Thanks again,
Elias
--
View this message in context:
http://cxf.547215.n5.nabble.com/JAX-RS-service-w-interface-result-type-XmlJavaTypeAdapter-tp564352p1843475.html
Sent from the cxf-user mailing list archive at Nabble.com.