Vikas Chowdhury
Vikas Chowdhury

Reputation: 775

JAX-WS SOAP return type

I am trying to use File as a return type for JAX-WS but its giving compile time error as "Class java.io.File may not be used as a return type or method parameter as it has inner types that are not public and static". Though error itself clarifies things but I would like to know if there are any other alternative of sending file as attachment with different return type.I think i can return in bytes[] & MTOM also but would like to get few more suggestions.

Upvotes: 0

Views: 240

Answers (1)

Subhomoy Sikdar
Subhomoy Sikdar

Reputation: 674

With SOAP I think you have limited options. You can try these classes once: javax.activation.FileDataSource; javax.activation.DataHandler; and give the proper MIME type

Upvotes: 1

Related Questions