I changed it to:
@Path("user/site/plant/device/addDevice1")
@POST
@Produces("text/xml")
@Consumes("multipart/form-data;type=text/xml")
Device addDevice(List<Device> device);
But it still doesn't work.
Same exception:Caused by: javax.ws.rs.WebApplicationException
at
org.apache.cxf.jaxrs.client.AbstractClient.reportNoMessageHandler(AbstractClient.java:487)
at
org.apache.cxf.jaxrs.client.AbstractClient.writeBody(AbstractClient.java:401)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl$BodyWriter.handleMessage(ClientProxyImpl.java:514)
... 5 more
Device is a JAXB Bean.:
@Entity(name="device")
@XmlRootElement(name="device")
@XmlAccessorType(XmlAccessType.FIELD)
public class Device extends DomainEntity {
/**
*
*/
private static final long serialVersionUID = 1L;
public Device() {}
@XmlAttribute(name="deviceName")
private String deviceName;
@XmlAttribute(name="deviceType")
private String deviceType;
@XmlAttribute(name="modelNumber")
private String modelNumber;
@XmlAttribute(name="serialNumber")
private String serialNumber;
..........
}
Who do I need to do next? Desparate to get this working.
Thanks for all your help.
--
View this message in context:
http://cxf.547215.n5.nabble.com/Help-required-with-apache-cxf-multiparts-tp3199975p3200103.html
Sent from the cxf-user mailing list archive at Nabble.com.