Reputation: 1543
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.
Upvotes: 0
Views: 424
Reputation: 340723
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
Upvotes: 2