I am trying to write a spring webservices which will be used to pass a file as byte[] value. Is this possible using webservice? Can anybody show an example in any website? I have searched a lot and i could not find one. PLease help.
Asked
Active
Viewed 400 times
1 Answers
2
You have several options:
mtom specification, supported e.g. in jaxb, looks like in spring-ws as well: Stream MTOM Web Services in Spring Web Services Framework
there are special data types in xml-schema to handle with binary data, see: JAXB (un)marshalling of xsd types: xsd:base64Binary and xsd:hexBinary
finally you can serialize this data yourself to text format (e.g. using base64) and pass as part of the request using simple
xsd:string
type

Community
- 1
- 1

Tomasz Nurkiewicz
- 334,321
- 69
- 703
- 674