Sending attachments to web service exposed via wsf-spring

benugu's picture
Hello, I am using wsf-spring 1.5 to expose a POJO as a web service. I need to accept a binary attachment as one of the params so I used byte[] as the parameter type on the server side. The client code generated using XMLBeans also provides a java type with byte[] as the param type for attachment. But reading an xls file into byte[] and passing it to the web service results in an empty attachment(0 bytes). Is there any other way that I can handle attachments with this framework? Does it support MTOM? If yes, can you please provide an example of how to use it both on client and server side? Thanks Benu.
nandika's picture

Re:Sending attachments to web service exposed via wsf-spring

You could use DataHandler for handling attachments. Also POJOs support MTOM Attachments as well. Regards Nandika
xdirewolfx's picture

any reference implementation

any reference implementation specifically for wsf-spring?
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)