THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
@XmlType public class Picture { private String title; @XmlMimeType("application/octet-stream") private DataHandler imageData; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public DataHandler getImageData() { return imageData; } public void setImageData(DataHandler imageData) { this.imageData = imageData; } } |
Note the use of 'application/octet-stream'. According to the standard, you should be able to use any MIME type you like, in order to specify the actual content of the attachment. However, due to a defect in the JAX-B reference implementation, this won't work.
2) Enable MTOM on your service
...