File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How to post file by webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to post file by webservice" Watch "How to post file by webservice" New topic
Author

How to post file by webservice

swenling wen
Ranch Hand

Joined: Jun 07, 2006
Posts: 32
I will post a file by webservice,my development enviroment uses cxf and tomcat.
I read file into byte stream,and client receive it.
Does that have some exception when post byte stream by webservice?
can you give me code?
Thanks!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12678
    
    5
The simplest way to provide a file through a web service is to use the REST style with GET. The CXF toolkit docs say they support REST style but I have not tried it.

Are there particular requirements for using SOAP and WSDL in your application? If not the Jersey open source RESTful implementation will be simpler.

Bill


Java Resources at www.wbrogden.com
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
http://theasolutions.com/tutorials/cxfuploadattachment.jsp

The above link explains how to upload a file using CXF and Tomcat. If client needs to receive the attachment [download], please follow the reverse logic. In case you need further assistance please let me know.
[ June 09, 2008: Message edited by: karthi keyan ]

http://www.skillassert.com


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to post file by webservice
 
Similar Threads
is method return type needs to implement the Serializable interface in webservice?
Axis Base64.encode Out of Memory Error.
CXF Problem
Post to an URL using HttpURLConnection
pdf load status