1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.oxm.jaxb;
18
19 import javax.activation.DataHandler;
20 import javax.xml.bind.annotation.XmlAttachmentRef;
21 import javax.xml.bind.annotation.XmlElement;
22 import javax.xml.bind.annotation.XmlRootElement;
23
24 @XmlRootElement(namespace = "http://springframework.org/spring-ws")
25 public class BinaryObject {
26
27 @XmlElement(namespace = "http://springframework.org/spring-ws")
28 private byte[] bytes;
29
30 @XmlElement(namespace = "http://springframework.org/spring-ws")
31 private DataHandler dataHandler;
32
33 @XmlElement(namespace = "http://springframework.org/spring-ws")
34 @XmlAttachmentRef
35 private DataHandler swaDataHandler;
36
37 public BinaryObject() {
38 }
39
40 public BinaryObject(byte[] bytes, DataHandler dataHandler) {
41 this.bytes = bytes;
42 this.dataHandler = dataHandler;
43 swaDataHandler = dataHandler;
44 }
45
46 public byte[] getBytes() {
47 return bytes;
48 }
49
50 public DataHandler getDataHandler() {
51 return dataHandler;
52 }
53
54 public DataHandler getSwaDataHandler() {
55 return swaDataHandler;
56 }
57 }