01: /*
02: * Copyright 2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
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: }
|