cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Penmatsa, Vinay" <>
Subject RE: JAX-RS XmlAttachmentRef
Date Tue, 14 May 2013 17:46:17 GMT
Oh I see...MTOM is enabled for @XMLElement. That's why it works.
Is swaref with @XMLAttachmentRef not supported?

-----Original Message-----
From: Penmatsa, Vinay [] 
Sent: Tuesday, May 14, 2013 12:49 PM
Subject: JAX-RS XmlAttachmentRef


Using CXF 2.6.1,

	private DataHandler email;

produces the following error:
Caused by: java.lang.UnsupportedOperationException
	at org.apache.cxf.jaxrs.provider.JAXBAttachmentMarshaller.addSwaRefAttachment(
	at com.sun.xml.bind.v2.runtime.SwaRefAdapter.marshal(
	at com.sun.xml.bind.v2.runtime.SwaRefAdapter.marshal(
	at com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(
	... 42 more

If I do this,

 private DataHandler email; 

it seems to work fine. There's a org.apache.cxf.jaxb.attachment. JAXBAttachmentMarshaller
that implements the addSwaRefAttachment() method. 
Somewhat confused what's happening.

Also, I need to support a list of attachments like say  List<DataHandler>. Does that


View raw message